If running a task with invalid arguments, minion currently just prints the validation error to stdout and skips execution of the task, eventually terminating with an exit code of 0.
I would expect it to quit with a nonzero code in this case, since the task has failed.
There's 3 options for fixes:
return an exit code from Minion_Task::execute and pass it to exit in the script wrapper. This would mean modifying index.php in kohana/kohana and requiring all users to change their own projects to match.
throw an exception from Minion_Task::execute and assume it will be unhandled and cause php to quit with an exit code.
just exit from Minion_Task::execute - hard to test and generally nasty.
Returning an exit code feels cleanest, but I think throwing an exception is the most sensible bugfix at this point?
If running a task with invalid arguments, minion currently just prints the validation error to stdout and skips execution of the task, eventually terminating with an exit code of 0.
I would expect it to quit with a nonzero code in this case, since the task has failed.
There's 3 options for fixes:
Minion_Task::execute
and pass it toexit
in the script wrapper. This would mean modifying index.php in kohana/kohana and requiring all users to change their own projects to match.Minion_Task::execute
and assume it will be unhandled and cause php to quit with an exit code.exit
fromMinion_Task::execute
- hard to test and generally nasty.Returning an exit code feels cleanest, but I think throwing an exception is the most sensible bugfix at this point?