Commit graph

9 commits

Author SHA1 Message Date
Seth Hoenig db2347a86c cleanup: prevent leaks from time.After
This PR replaces use of time.After with a safe helper function
that creates a time.Timer to use instead. The new function returns
both a time.Timer and a Stop function that the caller must handle.

Unlike time.NewTimer, the helper function does not panic if the duration
set is <= 0.
2022-02-02 14:32:26 -06:00
Michael Schurter 9732bc37ff nomad: refactor waitForIndex into SnapshotAfter
Generalize wait for index logic in the state store for reuse elsewhere.
Also begin plumbing in a context to combine handling of timeouts and
shutdown.
2019-05-17 13:30:23 -07:00
Alex Dadgar 4bdccab550 goimports 2019-01-22 15:44:31 -08:00
Josh Soref d300623abe spelling: evaluation 2018-03-11 18:01:35 +00:00
Armon Dadgar 7cdcc45c64 nomad: cleanup stats goroutines 2015-08-05 16:45:50 -07:00
Armon Dadgar 2f84e37cd0 nomad: allow testing if plan queue enabled 2015-08-05 16:30:57 -07:00
Armon Dadgar 1a3afe3425 nomad: use plan enqueue time instead of eval create index 2015-07-28 17:49:27 -07:00
Armon Dadgar adcad9a5fb nomad: fixing plan queue dequeue with no timeout 2015-07-27 15:31:39 -07:00
Armon Dadgar 3a4efce389 nomad: adding plan queue 2015-07-27 14:59:16 -07:00