Users might reasonably expect that no item processing is done when in maintenance mode.

Perhaps a setting could be created to opt in maintenance mode to:
* Keep processing
* Do not process
* Do not process and loop & sleep for seconds awaiting maintenance mode exit.

The reasonable default would be 2, but first option could be set on a hook_update to keep current behaviour in existing installs.
The third option would be useful to avoid hammering the system by looping too fast between mob-exe-queue invocations.

Also, if possible, returning a distinctive exit status from the drush command execution would allow wrapper scripts to react accordingly., if needed. Ideas on which exit status code and/or range welcome.

Comments

amontero created an issue. See original summary.

amontero’s picture

Bump. Any feedback on the proposal?

wuinfo - Bill Wu’s picture

Sounds like a good idea, but I think it is a nice to have feature. Do we have any compelling reason to add this option?

We are using Drush command to execute queues. We can do it in the shell script.

amontero’s picture

Issue summary: View changes

Which shell script do you mean? In our scenario, we have several worker nodes running meq in continuous-loop and we just need meq to safely skip any item processing until everything is back online.

The possibility of breaking things by processing items while in maintenance mode (running update.php, for instance) is something potentially harmful, which makes for a compelling enough reason.

Adding an exit code status return to the OP proposal.