Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Should exit with error status on invalid arguments #109

@acoulton

Description

@acoulton

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?

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions