schmittjoh / JMSJobQueueBundle

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

Original job should be referenced on manual retry #85

Open nclavaud opened 9 years ago

nclavaud commented 9 years ago

Hitting the Retry button for a failed job will create a new job that does not reference the original. Even if the retry is successful, the failed job will remain in failed state at the top of the board.

The new job should reference the job that has failed previously. If the retry is successful, the original, failed job should reach state finished.

nclavaud commented 9 years ago

Just noticed a related PR (sorry): #40

nclavaud commented 9 years ago

Anything I could do to see this PR merged? Would help get rid of #40 also (duplicate).

schmittjoh commented 9 years ago

Not sure about this. I do not like modifying a failed execution.

If we need something like this, I'm more for splitting up the Job entity into Job and JobExecution for example, where a Job can have many executions.

nclavaud commented 9 years ago

I do not like modifying a failed execution.

I get your point, but that's already what we've been doing here with automatic retries: https://github.com/schmittjoh/JMSJobQueueBundle/blob/master/Entity/Repository/JobRepository.php#L313

However, the Job / JobExecution distinction would indeed help keeping track of state changes and looks like a decent pattern.

byhoratiss commented 9 years ago

Finally I find it, it wasn't happening only to me! +1 for this!

PATROMO commented 7 years ago

👍

suiXz commented 6 years ago

Please accept this PR !