Commit Graph

15 Commits

Author SHA1 Message Date
Guo Xiang Tan cff108762a Fix deadblock in 615a22a579. 2019-02-20 10:25:43 +08:00
Guo Xiang Tan 615a22a579 FIX: Race condition in SidekiqPauser.
This was showing up in our tests.
2019-02-20 09:52:26 +08:00
Guo Xiang Tan adbc87857e DEV: Fix randomly failing test.
Even if a thread is alive in the loop check, it may be dead by the
time `Thread#wakeup` is called on it.
2019-02-19 13:34:52 +08:00
Guo Xiang Tan bf21ebaecc DEV: Allow custom value when pausing sidekiq to aid in debugging.
Sometimes, it is useful to know what caused Sidekiq to be paused.
2019-02-19 10:55:53 +08:00
Sam 74d2d4f658 FEATURE: add APIS for unpausing all sites
This adjusts 53d592ad by @tgxworld

- Adds Sidekiq.upause_all! to unpause all sites
- Adds Sidekiq.paused_dbs to list dbs that are currently paused
- Handles some edge cases where unpause thread could extend expiry on
sites that were unpaused from a different process
- Ensures tests always terminates background thread used for pause
keepalive
2019-02-14 13:34:20 +11:00
Guo Xiang Tan 53d592ad3b FIX: Add multisite support to Sidekiq::Pausable. (#6960)
Having a global Sidekiq pause switch is problematic because a site in
the cluster can pause Sidekiq for the entire cluster.
2019-02-14 12:22:40 +11:00
Sam 44cf3cf975 FIX: queue heartbeats in readonly modes
If sidekiq is paused or Discourse is in readonly continue to queue
heartbeats

If we do not do that then a master process can end up reaping sidekiq
workers and causing various badness

This also impacts restore which can do weird stuff TM in cases like this
2018-08-29 12:36:59 +10:00
Guo Xiang Tan 4163f9e61e DEV: Better clean up for PostgreSQL failover test. 2018-07-10 09:53:25 +08:00
Sam 361fbfa518 FEATURE: raise an event when a sidekiq job runs 2017-10-23 17:30:17 +11:00
Régis Hanol fbacaab2fc FIX: disable scheduled jobs when in readonly mode 2016-01-11 18:31:28 +01:00
Sam 6d9a88c33b FIX: hanging specs 2014-08-19 20:56:25 +10:00
Sam 35ea1274e2 FIX: simplify, use our redis instead 2014-08-19 15:50:17 +10:00
Sam 997ab7a770 FIX: signaling seems flaky, simply kill thread 2014-08-19 14:59:40 +10:00
Sam cb686792df FIX: add safety so sidekiq can no longer be paused indefinitely
If the process pausing sidekiq dies sidekiq will come out of pause mode
2014-08-19 14:04:58 +10:00
Régis Hanol 90c00fcaba pausable sidekiq module 2014-02-13 13:31:13 -08:00