Skip to content

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

Merged
taylorotwell merged 5 commits into
laravel:5.4from
Broutard:Broutard-patch-1
May 8, 2017
Merged

[5.4] fix: stop worker if a database disconnection occured#19080
taylorotwell merged 5 commits into
laravel:5.4from
Broutard:Broutard-patch-1

Conversation

@Broutard

@Broutard Broutard commented May 5, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Title please.

@taylorotwell

Copy link
Copy Markdown
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

Broutard commented May 6, 2017

Copy link
Copy Markdown
Contributor Author

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

@Broutard

Broutard commented May 6, 2017

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

Broutard commented May 6, 2017

Copy link
Copy Markdown
Contributor Author

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