Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4] fix: stop worker if a database disconnection occured #19080

Merged
merged 5 commits into from
May 8, 2017
Merged

[5.4] fix: stop worker if a database disconnection occured #19080

merged 5 commits into from
May 8, 2017

Conversation

Broutard
Copy link
Contributor

@Broutard Broutard commented May 5, 2017

fix issue #19072

Broutard added 5 commits May 5, 2017 23:42
fix: styleCI
fix spaces
refacto: add a $shouldStop property to force stopIfNecessary()
fix: remove useless use
@tillkruss
Copy link
Contributor

Title please.

@taylorotwell
Copy link
Member

I don't think we need a shouldStop and a shouldQuit.

@themsaid themsaid changed the title Update Worker.php [5.4] Update Worker.php May 6, 2017
@Broutard Broutard changed the title [5.4] Update Worker.php fix: stop work if a database serious connection occured May 6, 2017
@Broutard Broutard changed the title fix: stop work if a database serious connection occured fix: stop worker if a database serious connection occured May 6, 2017
@Broutard Broutard changed the title fix: stop worker if a database serious connection occured fix: stop worker if a database disconnection occured May 6, 2017
@Broutard
Copy link
Contributor Author

Broutard commented May 6, 2017

@taylorotwell the previous valid commit #96b465e only stop() the worker.

@Broutard
Copy link
Contributor Author

Broutard commented May 6, 2017

Maybe a simple reconnect should do the trick... but if I reconnect on a job, other jobs still down

@tillkruss tillkruss changed the title fix: stop worker if a database disconnection occured [5.4] fix: stop worker if a database disconnection occured May 6, 2017
@taylorotwell
Copy link
Member

Why not just use the existing shouldQuit variable? Why did you need to make a new one?

@taylorotwell taylorotwell reopened this May 6, 2017
@Broutard
Copy link
Contributor Author

Broutard commented May 6, 2017

The shouldQuit variable do a kill() and do not fire any event.
The truth is that I did not understand the difference between kill () and stop ()

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.

3 participants