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

1
vote
1answer
12 views

Batch API callback method is not call

Here is my source: function sc_delete_user_confirm_form_submit($form, &$form_state) { //... $batch = array( 'operations' => array(), 'finished' => ...
0
votes
0answers
17 views

Batch job not running callback

I am trying to run a batch job of importing items from a csv file. When I click submit on my form and my batch process starts, I do get a batch process bar which says its progressing, but it never ...
0
votes
0answers
21 views

Can't Get Batch Processes To Complete/Start Anymore - No Progress Bar

I have tried many different actions that use the /batch?op=start&id operation in Drupal. For some reason, nothing is working anymore. Can't download module updates, delete users, run VBO ...
0
votes
0answers
13 views

D7 batch processes not running

I am running the cck content migrate module and I disabled all non-core modules, set the theme on garland and when I try to migrate a field that is able to be migrated, it goes to a batch processing ...
0
votes
0answers
20 views

What's a good size for each batch in an upgrade script?

I'm adding an upgrade routine to my D7 module's .install file. This is a public module used on thousands of sites, so the upgrade needs to work in a variety of situations. The task is to process and ...
0
votes
1answer
167 views

Why won't this update in hook_update_n() run in batches correctly?

I am working on this issue in the Feeds issue queue: https://www.drupal.org/node/2341407 I am trying to make the updates to the importers run in batches. I can't figure out why this won't run in ...
0
votes
2answers
29 views

Batch API is setup in my module but it does not open batch window progress

I am learning hot to use Drupal for my physics PHD. I was studying how to insert a batch into my custom module. I wrote a simple module which allows to upload a CSV through a form, check the extension ...
1
vote
1answer
31 views

Batch operation for consuming data from API via drupal_http_request

I am consuming data from an API which provides a URL similar to: http://data.something.com/api/records?pageIndex=0&pageSize=25 The API will return XML which I will then use to create nodes. There ...
0
votes
0answers
23 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
46 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
33 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: ...
2
votes
0answers
121 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
69 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
47 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
78 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
12 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
44 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
70 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
61 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
125 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
72 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
108 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
1k 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
266 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
610 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
752 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
99 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
148 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
204 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
595 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
1answer
498 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
191 views

How to add Cancel button to Batch operation?

How to add Cancel button to Batch operation? Is this even possible?
0
votes
1answer
178 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
63 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
456 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
198 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
571 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
250 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
890 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
526 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
109 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
732 views

My queue table is huge, is it safe to empty it? [duplicate]

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
305 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
570 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
42 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
627 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
384 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
131 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 ...