Skip to content

* adding yield at end of run block, to allow sensu-server shutdown#14

Open
sethcall wants to merge 3 commits intoseegno:masterfrom
sethcall:master
Open

* adding yield at end of run block, to allow sensu-server shutdown#14
sethcall wants to merge 3 commits intoseegno:masterfrom
sethcall:master

Conversation

@sethcall
Copy link
Copy Markdown

Without adding this yield, I could never shutdown sensu-server using /etc/init.d/sensu-server restart

In the logs, you'd see this, where handlers_in_progress_count would be a higher value, depending on how many influxdb handler calls were made.

This patch allows me to restart OK.

{"timestamp":"2014-12-26T17:41:42.569722+0000","level":"warn","message":"received signal","signal":"TERM"}
{"timestamp":"2014-12-26T17:41:42.570002+0000","level":"warn","message":"stopping"}
{"timestamp":"2014-12-26T17:41:42.570101+0000","level":"warn","message":"unsubscribing from keepalive and result queues"}
{"timestamp":"2014-12-26T17:41:42.570391+0000","level":"warn","message":"resigning as master"}
{"timestamp":"2014-12-26T17:41:42.570501+0000","level":"info","message":"completing handlers in progress","handlers_in_progress_count":2}

@sethcall
Copy link
Copy Markdown
Author

Also fixing issue where time posted to influx was in milliseconds, not microseconds.

@alfredopalhares
Copy link
Copy Markdown

Hello @sethcall

Can you separate this into 2 pull requests?

Also is yield still necessary ?
I was told on #sensu at freenode.org that its no longer necessary. I tested and saw no difference, what version of sensu are you running ?

@roobert
Copy link
Copy Markdown

roobert commented Jul 8, 2015

Thanks for this extension! Just wanted to say that I had to add the yield when using sensu 0.19.2 before the server would restart properly.

@BarthV
Copy link
Copy Markdown

BarthV commented Jul 30, 2015

👍
Same bug with Sensu 0.20.1 with the extension@master

# service sensu-server stop
 * Stopping sensu-server
 * Timed out waiting for sensu-server to stop
# sensu-server -V
0.20.1

@alfredopalhares
Copy link
Copy Markdown

@sethcall can you rebase with master?
Could you also reword the commits by removing the * and place the verbs in the infinitive ?

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.

4 participants