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

Comments

infojunkie’s picture

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

infojunkie’s picture

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()) ?

moshe weitzman’s picture

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.

infojunkie’s picture

Status: Active » Fixed

Impersonating admin did the trick ! Thanks a lot.

Looking forward to your feedback.

Status: Fixed » Closed (fixed)

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