The tag refers to the Drupal core API that allows developers to split a big task in to several minor chunks or batches.

learn more… | top users | synonyms

0
votes
0answers
10 views

Drupal batch_set for drupal_http_request()

Created one menu callback to download XML file. function download_xml () { // webservice logic ..... ..... $result = drupal_http_request($url, $options); if ($result->code != 200) { ...
1
vote
1answer
20 views

Batch operations not called

I have a module with batch operations, this is my hook_menu $items['some-pretty-url'] = array( 'title' => 'Title', 'page callback' => 'drupal_get_form', 'page ...
0
votes
1answer
22 views

Drush and batch

i got an array of items. On each item, a process is executed wich manipulates data, write things to the database,... When i execute my drush script (ex: drush mycommand) i start a batch process: ...
1
vote
0answers
34 views

Drupal 7: Permission Denied (403) using /batch

I have run into a scenario where I am getting an 'Permission Denied' error when attempting to run anything that uses batch, with the sole exception being CRON. First off, this error is NOT related to ...
0
votes
1answer
26 views

How to speed up Batch API processing

Ok, so I've got a script that's going to go through about 13000 nodes (which might be part of the problem, but I don't think it is). I can either put them as one large array, which seems to go ...
0
votes
0answers
19 views

Deleting user accounts produces error

I am getting an error when I try and delete old user accounts that I've been testing with. The batch operating hangs for the max execution time and either gives a max execution time error or max ...
0
votes
1answer
51 views

Batch process stuck repeating first operation over and over

It's my first time working with the Batch API. I have a batch operation that I have almost working, but it gets stuck on the first item and I'm out of ideas on how to fix it. What the batch thing ...
0
votes
0answers
8 views

Batch Processing On Local Windows Install

I've noticed on a local instance of Drupal I have on a Windows 7 machine (I know, not the best environment for Drupal) that all my batch processes seem to just die completely before they are even ...
0
votes
1answer
31 views

Is there a Self-Imposed Bulk Operations Limit?

My database has millions of nodes. We've been approved to delete a very large amount of them given certain criteria so I set up a view with VBO to handle the batch deletions. I've exposed the pager ...
1
vote
2answers
57 views

Is it possible to publish from my local computer a node in my drupal page remotely?

I wonder if it is possible from a SH script on my local computer, publishing content on a remote installation of drupal. Why have a gammu sms gateway and when a new sms on my local computer I want to ...
0
votes
1answer
53 views

Batch API and Drupal on a Dreamhost dedicated server

I am on a Dreamhost dedicated server. I use it to host Drupal sites that our company creates. We recently moved on to this server from another hosting company and have noticed that Batch API features ...
2
votes
1answer
101 views

Is it possible to use the batch API with drupals database transactions?

I'm using the batch api for reading large csv files and storing some information in my database. If something fails during the batch run I want all the processed information to be gone, I would like ...
0
votes
0answers
50 views

How do I debug mymodule_batch() with xdebug?

In my submit function, I call the batch api with batch_set($batch). I am able to insert an xdebug_break() and debug the submit function as normal. However, when batch_set() calls mymodule_batch(), ...
3
votes
1answer
80 views

Execute pending queues using batch? Possible?

I have implemented the Queue API inside hook_cron, to do certain update operations on a site: function HOOK_cron() { $interval = variable_get('variable_val', 60 * 60 * 24); if (time() >= ...
0
votes
2answers
927 views

An AJAX HTTP request terminated abnormally [closed]

I am running a large script using batch api. I am sending newsletter mails to users. Mail sending is in bulk. I mean the mails is going to 8000 users. For testing I sent it to 1000 users and it worked ...
0
votes
1answer
193 views

Migrate module only imports first line of CSV file

I have a Migrate module class that works with CSV files and when I go through with the import it only goes through the first line of the CSV and then completes with a success message. That one line ...
1
vote
1answer
410 views

Feeds - Background process vs Batch API

I've being using Feeds to import a medium sized amount of nodes in a daily basis. I'm using Elysia cron in order to get fine tuning cron settings. Here's my flow : Every day at 02 am a cron task is ...
4
votes
2answers
452 views

Can a batch process be stopped

Is there a way to force a batch process to stop if some kind of error occurs? In particular, I have a batch that starts with saving a record to a database. Each subsequent batch operation depends on ...
1
vote
1answer
87 views

How do I create a redirect after using pathauto_node_update_alias()

I am using the Redirect module. I have a feature, where I have an update hook, that updates (and fixes) the path alias of the nodes on the site (after I made a change to the pathauto pattern). I ...
0
votes
1answer
123 views

Creating a Batch with multiple functions

i'm trying to optimise my setup of a Drupal Batch process. I am reading in thousands of rows of data from an Excel spreadsheet, from multiple worksheets, and creating nodes from the Rows. My import ...
0
votes
1answer
171 views

Specify which theme to use when rendering a page with drupal_render_page()

I'm looking to send out a node as an HTML email. I have the code working except for one part. I'm using drupal_render_page() to render the page's content so it's ready for an HTML email. I thought ...
4
votes
2answers
499 views

How Batch Works Around the PHP Timeout

The Drupal 7 documentation introduces the Batch API as: Functions allowing forms processing to be spread out over several page requests, thus ensuring that the processing does not get ...
0
votes
0answers
378 views

Batch API - progress bar advances, operations does nothing

I'm trying to create a batch to import users. I used this (http://pastebin.com/duTbxpgd) as an example, but somehow it's not working. I see the progress bar advancing and It's showing the right number ...
2
votes
2answers
153 views

How to add Cancel button to Batch operation?

How to add Cancel button to Batch operation? Is this even possible?
0
votes
1answer
116 views

Batch operations do not get called

I am trying to write a batch. And I have a problem that none of the batch operations callback functions are getting called. I wrote drupal_set_message at the start of each callback and none of the ...
2
votes
2answers
58 views

my D7 batch is running with every request to anywhere on my site

I'm writing a batch module and for some reason every time I load any page on my site, the batch is running. The other weird thing that may be related is that the $context['sandbox'] is not being ...
3
votes
1answer
374 views

I have a error in my batch api operations, and I don't find the solution

Hello I run this in a form_submit function: <?php function generate_xls_form_submit($form, &$form_state) { $data = array(); $information = ''; ...
0
votes
1answer
150 views

Batch-API: what am I doing wrong in this code?

I am trying to develop a module to insert a lot of node at one time and I would like to use Batch-API to display the progress of operations. I read the example into 'Example' module and I wrote this ...
1
vote
2answers
422 views

Batch API - pass data between operations of a single Batch?

Is there any way to pass data between operations of a single Batch, when using Batch API ? for an example, say I have $batch['operations'] as an array like this: // Basic batch stuff to $batch ...
3
votes
2answers
201 views

When using the Batch API should I create an operation per node?

I am using the Batch API in Drupal 7 and I just realized that the reason why my count and totals are not showing correctly is because the initial total is based on a count of the operations given to ...
2
votes
1answer
659 views

Batch API passing data to finished function

I am creating a batch import and I would like to pass two different counts to my finished function. For example in my 'operations' function I check for an NID if it exists update the node if it ...
0
votes
1answer
382 views

How to create multiple batch imports

Ok I have been working with the batch API and I have one working successfully now I would like to run another batch after the first one. batch_set says I can do this: array( ...
0
votes
1answer
95 views

Drupal 7 Batch Question

I'm trying to set up a batch process and from the examples I see: $context['results']['processed']++; $context['message'] Is there a list of these, 'buckets' somewhere?
3
votes
0answers
581 views

My queue table is huge, is it safe to empty it?

I have launched some batch jobs that I didn't finish. Now I notice my queue table is almost 1 GB. Is it safe to empty it?
0
votes
1answer
277 views

Custom Views Bulk Operation using Batch API

I am using Views Bulk Operation for updating custom value. I created a custom Operation using hook_action_info. How can I use Batch API with my custom action if I have to Operate on maximum nodes.
4
votes
2answers
509 views

Theme the progress bar when in batch API with AJAX

I am looking to create a stylized theme for the progress bar for the batch API screen. I wish to alter the HTML and CSS being displayed in order to do so. I know how to add the CSS to the page. I am ...
0
votes
2answers
2k views

Getting the error “No active batch.” when running any batch

I am getting this error when running any batch on the site: No active batch. I thought this may have been a server issue, so I tried it locally, but I got the same error. I tried deleting all ...
0
votes
0answers
39 views

Running recommender encounter an internal error

I'm using recommender module to generate prediction for product. But every time i run recommender, memory gets exhausted. Can anyone suggest me how to resolve this problem. Message - Running ...
7
votes
2answers
2k views

How does the batch API work internally?

I ran into a timeout issue using migrate the other day and started to wonder how the batch API works internally. The way I understand it is that in its simplest form you'll pass an array of values ...
1
vote
3answers
535 views

How to run a batch process in regular interval

I need to Unpublish the nodes which are all not Updated for more than some specified time. I'm having the query to fetch nodes and by using a batch process I will Unpublish those nodes one by one. ...
2
votes
1answer
311 views

How to terminate a batch when an error occurs

I've read this: http://api.drupal.org/api/drupal/includes%21form.inc/function/batch_set/6 and through the source code, but I cannot see how a batch operation can flag that an error has occurred to ...
0
votes
2answers
121 views

Drupal 6 Show custom page while server processing a form

Looking for advice. Form submit handler sends some time consuming requests to other servers. I need to show custom page with some simple content like timer/progress-bar/images while server will ...
1
vote
2answers
513 views

Minimally working end-to-end example of drush batch job execution

I'm trying to make drush run my batch jobs. There's some amount of documentation at Processing batch jobs with drush, however, I can make no sense of it. I would like to see real code, and the CLI ...
2
votes
2answers
307 views

What's the correct way to redirect the user when a Batch API job finishes?

I've got a form that starts a batch job. What's the right way to redirect them after it finishes? Calling drupal_goto() in my finish function?
1
vote
1answer
519 views

batch api for large batches

After all my research, I think the question I should be asking is: After a form submit, can I create multiple batches based on the maximum table size for the serialized batch string and how can ...
1
vote
3answers
425 views

permission denied when using batch

I have just switched over a site live and I'm having problems regenerating the XML sitemap. When I try, I get: You are not authorized to access this page. The URL is: ...
1
vote
1answer
401 views

How do I force batch to use nojs?

I am having trouble using batch. The problem is that on the client website, there is an error in the jquery file in the jquery_update module and I am not allowed to change this because I am just ...
1
vote
2answers
1k views

Can I force cron to process all of my queued tasks?

My D7 module uses hook_cron to mirror a big external datasource locally. For each new or updated row, $queue->createItem() schedules a task requiring several external API round trips to build the ...
4
votes
2answers
398 views

How can I increase memory_limit for batch processes only?

I have a batch process that occasionally exceeds the memory_limit, which is currently 96M. Of course I know the ways to increase the memory limit for the whole site, but I prefer to increase the ...
0
votes
1answer
74 views

D7: Batch resave menu items

Is there a way to resave all items in a particular menu batch-style? I'm trying to avoid saving each menu item manually, there are so many of them...