Fire a bulk operation from drush

moshe weitzman - September 22, 2009 - 12:51
Project:Views Bulk Operations (VBO)
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I would love to fire bulk operations from drush. For example, 'delete all story nodes'. FYI, there is a drush views module which may or may not be useful

#1

kratib - September 22, 2009 - 23:55

Great idea. I'm working on a pre-requisite to this, namely #461050: Programmatic access to VBO.

#2

kratib - September 27, 2009 - 09:09

Implemented in the latest dev. Please try it! I added two new commands: vbo list and vbo execute.

Ont thing that's not working correctly yet is that some actions go missing when run from drush. That's because not all modules are loaded by drush AFAIU. Can you suggest a way for VBO to declare a dynamic dependency on these modules (that expose hook_action_info()) ?

#3

moshe weitzman - September 27, 2009 - 14:33

by default, drush does a full bootstrap before dispatching control to the command callback. so all enabled modules should certainly be loaded. i looked at your small, lovely drush code and you don't specify alternate bootstrap in the command definition so i don't know why modules would be missing. would it help to switch to user id = 1 at the beginning of you command callback? just wondering if it is a perms issue.

thanks so much for this. i will play with it.

#4

kratib - September 27, 2009 - 17:45
Status:active» fixed

Impersonating admin did the trick ! Thanks a lot.

Looking forward to your feedback.

#5

System Message - October 11, 2009 - 17:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.