schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
335 stars 254 forks source link

Command throws exception but job still marked as finished #26

Closed NicParry closed 11 years ago

NicParry commented 11 years ago

I'm really not sure if this is the intended functionality, but when the job's command throws an exception the job's state is still set to 'finished' instead of 'failed'.

If it is intended to work this way, what can I do to force a job's state to be 'failed', from the command?

NicParry commented 11 years ago

I figured it out. In order to fail the job the exception thrown must have the code(the second parameter) set to 255