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
1answer
30 views

How do I process a huge list of files?

I have a huge list (> 100 000) of files that need to be processed. I want processing to run in the background and continuously (when it has processed the last, it just restarts on the first). I've ...
2
votes
3answers
59 views

How to handle non-fatal errors during batch operations?

Most tutorials about Drupal batch processing suggests that you provide something like the following as a callback for when the batch has finished. function mymodule_finished($success, $results, ...
0
votes
1answer
31 views

Batch Process in D8 [closed]

I'm trying to create a batch process in Drupal 8, but I'm getting the following error: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'logs_export_data' not ...
1
vote
0answers
25 views

BATCH api An error occurred. Fatal error : Out of memory

I'm using batch API in a custom module to clone millions of nodes programmatically but I am facing an error: An error occurred. /batch?id=7&op=do Fatal error: Out of memory (allocated ...
4
votes
1answer
121 views

Hitting the back button after a batch process cause a nasty error

I have a batch process (using batch API) that runs when a user on my site tries to launch a non signed Java applet. The batch process does all the needed codesigning and other things and then ...
0
votes
0answers
8 views

Problem to Setting Batch in Drupal 6

I am new in Drupal world and facing some problem to set batch process in Drupal 6. It's not showing error or warnings showing some progressing bar but not achieving the required results It seems it's ...
0
votes
1answer
34 views

Drupal 7 Batch api process next operation if existing operation is taking too much time

I am using batch api for processing the operations. In my operation I am sending xml request to different-different external server and waiting for its response, after getting its response I am ...
0
votes
0answers
11 views

Batch set in multilingual website

I have the following function to process/set my batch function setBatchingProcess() { global $language; $batch = array( 'title' => variable_get('batch_title'), // t('Saving and sending'), ...
2
votes
1answer
53 views

Can I put batch api callbacks in an include file?

I have a .module file that is getting quite lengthy, and I added some batch functionality to it. I put the form and batch callbacks in a separate .inc file, and added the appropriate file directive to ...
0
votes
1answer
50 views

How to get batch ID?

I'm running some really long batch process. So in case user navigates away from the batch progress page, I'd like to be able to give him a link that leads back to that page. How can I get the batch ID ...
1
vote
0answers
25 views

Why do batch operations not run for user deletion?

On a client's website, batch operations don't run when cancelling/deleting a user account (No progress bar shows up and no process runs). Neither of the users have any content related to them as ...
0
votes
1answer
24 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
57 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 ...
1
vote
0answers
78 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
23 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
27 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
213 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
46 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
38 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
43 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
53 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
72 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
1answer
210 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
2answers
173 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
85 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
141 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
1answer
66 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
91 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
74 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
186 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 ...
3
votes
1answer
186 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
350 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 ...
4
votes
2answers
1k 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
1k 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
136 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
192 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
282 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
777 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 ...
1
vote
1answer
686 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
285 views

How to add Cancel button to Batch operation?

How to add Cancel button to Batch operation? Is this even possible?
0
votes
1answer
270 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
70 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
671 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
289 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 ...
2
votes
2answers
1k 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
3answers
419 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 ...
3
votes
1answer
1k 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
777 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
129 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?