The tag refers to the Drupal core API that allows developers to split a big task in to several minor chunks or batches.
0
votes
1answer
48 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 ...
3
votes
2answers
63 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
24 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 ...
1
vote
2answers
26 views
How to add Cancel button to Batch operation?
How to add Cancel button to Batch operation?
Is this even possible?
0
votes
1answer
25 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
31 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 ...
0
votes
1answer
39 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
47 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 ...
0
votes
2answers
43 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
64 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
60 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
69 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
43 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?
1
vote
0answers
45 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
74 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
203 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
1answer
395 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
23 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 ...
5
votes
2answers
327 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
2answers
200 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
59 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
74 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
144 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
77 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
237 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 ...
0
votes
2answers
149 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
223 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 ...
0
votes
2answers
422 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
203 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
64 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...
4
votes
1answer
107 views
Create successive Batch script?
How can you create a successive batch job in the Batch API?
For example, if I wanted to queue and assemble 1000 nodes as a batch, then process them in a second batch when the first batch is done, ...
1
vote
2answers
306 views
Error importing csv with batch API
I'm using this code in my batch job:
<?php
function my_module_csv_import() {
$folder = "csv";
$files = scandir($folder);
// define batch array structure
// NOTE: minimal parameters ...
0
votes
0answers
646 views
How to programmatically iterate over nodes, load into form, and save the form?
I have some nodes that I imported via Feeds. The nodes have addressfields and geofields but unfortunately Feeds apparently just calls node_save and so the geocoding is not triggered because ...
1
vote
1answer
176 views
Testing Batch API usage with Simpletest
I've written a module that reads a csv of user records and imports them into Drupal 6 using the Batch API. The Batch API operations callback basically just does a user_save(). It works fine when I ...
2
votes
1answer
2k views
Adding taxonomy terms to multiple nodes at once
I've got thousands of nodes which i can filter down to smaller lists using Views.
I then wish to add multiple taxonomy terms to the subset of nodes as a batch process. Views Bulk Operations module ...
0
votes
0answers
104 views
problems with a batch api module
Seems that the function
_calcular_tiempo_usuario
it's not call, and It's no save nothing in the $_SESSION vars.
<?php
function proyecto_estadisticas_menu(){
...
0
votes
1answer
394 views
Batch operation not called
I am trying to write a Batch import to create nodes based on a uploaded file. The form works and I receive the file, and can read it in my submit callback which should initiate the Batch import. Here ...
0
votes
1answer
126 views
Is Drupal suitable to a project that needs erase/update daily thousand of nodes?
Currently I have a custom PHP web application that, from a XML file in a batch process, update and erase a lot of content in this task (in Drupal language it would be importing/deleting, in a batch ...
1
vote
3answers
310 views
The Batch API won't continue running if the browser is closed correct? Can a batch be run with Drush?
Can the batch API continue to run once the browser closes? If not then can I run a batch with Drush? I have an insane amount of data to migrate and I don't really have time to wait for it to import ...
1
vote
1answer
168 views
Question about using Drupal 6 batch API
When using the batch API, can I setup multiple batch jobs or can I only setup one batch with multiple operations? I ask because of a data migration I am doing.
Also, will it run the batches and ...
5
votes
2answers
959 views
batch importing node data — via database?
I'm looking to migrate an existing site to Drupal. I have a a content type on the new Drupal site that will eventually hold some 1500 nodes. Of course, I don't want to enter each one in the form on ...
1
vote
2answers
456 views
Starting batch operations from hook_node_update()
When importing content using Feeds using an importer associated with a node type, the mapping can be configured to assign taxonomy terms from the Feed Node to the imported Feed Items. On a project, we ...
7
votes
3answers
863 views
Drush Scripting? Or Batch API?
We have an Ubercart website that handles large volumes of orders daily, processes them and runs other tasks like billing, delivery routing, and future order creation.
Some of these tasks are heavy ...
8
votes
4answers
965 views
How to speed up Batch API Operations?
I've run into this both with 3rd party contrib modules as well as some of my own operations. I'm curious at the various ways to speed up my/contrib batch operations?
Assume they work with nodes ...