Skip to content

Conversation

@net53
Copy link
Contributor

@net53 net53 commented Jan 2, 2018

There are Job1 and Job2.
Added to the queue using Job1::withChain([new Job2 ()])->dispatch();

If Job1 $tries = 2 and Job2 $tries = 1. Then if the second attempt is successful for Job1, Job2 will not be executed because $ job->attempts () for Job2 will immediately return 2.

And if $tries are the same, then the number of attempts for the next will be less by the number of failures in the chain than should be.

@net53 net53 changed the title fix chained jobs attempts Fix chained jobs attempts Jan 2, 2018
@net53
Copy link
Contributor Author

net53 commented Jan 3, 2018

And another case.
If Job2 was dispatched from Job1 on second attempt, then Job2 will fail because of attempts_count=2 or will have less attempts.

Please check and merge this important fix.

@vyuldashev vyuldashev merged commit acc827b into vyuldashev:master Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants