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 |
Jump to:
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
I had been meaning to look into that, thanks for the tips. Fix committed.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.