Batch API tweaks

yched - April 6, 2009 - 23:34
Project:Deployment
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

Deploy module looks terrific ! Thanks Greg.

A couple minor remarks regarding the use of batch API :
- Your batch ops (deploy_plan_check_item_batch, deploy_item_batch) don't take tha batch $context as an argument, thus $context['message'] = t('Now processing %item', array('%item' => $description)); has no effect. Batch API provides $context as the last parameter of the op functions, you can take it by ref and add messages and results.
- Using $context['sandbox'] is only relevant for multipass operations (one single operation that gets called repeatedly until it declares itself as 'finished'. Not your case, so you can drop those lines.

#1

heyrocker - April 9, 2009 - 14:42
Status:active» fixed

I had been meaning to look into that, thanks for the tips. Fix committed.

#2

System Message - April 23, 2009 - 14:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.