Closed (fixed)
Project:
Drush
Component:
Core Commands
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2010 at 22:21 UTC
Updated:
30 Oct 2010 at 17:10 UTC
If you execute a drush command that invokes drush_backend_batch_process() as a user other than 0 (i.e. drush -u 1 foo_command) the logged in user will not be passed off to the batch command. This can result in inconsistent batch behavior. Specifically I saw this with a batch process that my custom drush command executed to delete nodes.
I have attached a patch that fixes this issue, but in the meantime anyone that needs to do this can change the way they call drush_backend_batch_process() like this:
<?php
// ...
global $user;
drush_backend_batch_process('batch-process -u ' . $user->uid);
?>
| Comment | File | Size | Author |
|---|---|---|---|
| drush.patch | 2.08 KB | elliotttf |
Comments
Comment #1
greg.1.anderson commentedThe code looks good (reviewed but not tested). I don't think there is any code path in drush core to test this, but I am not opposed to committing.
Comment #2
moshe weitzman commentedLooks good to me too. Committed.