1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Mike Perham
20f4cdb4ff Fix various flaky tests due to process-wide data changes 2019-02-28 14:12:08 -08:00
Mike Perham
30bbd13a5e Update tests so they all run standalone successfully, like so:
for i in test/test_* ; do ruby $i; done
2018-12-03 14:09:26 -08:00
Andrew Babichev
ddb0c8b3a8 Cleanup CLI (#4026)
* Refactor CLI test

Extracted 3 main parts:
- parse
- run
- signal handling

* Move demonization and pid write from parse to run phase

* Move queues default from validate to setup options phase

* Add pry-byebug gem

* Drop Sidekiq::Test

* Require launcher in CLI

* Remove TODOs
2018-12-03 13:24:37 -08:00
Mike Perham
b9d4eae062 Exceptions raised during the startup event should kill the process, fixes #3717 2018-01-11 09:37:55 -08:00
Mike Perham
5315e09c56 Ensure TID changes after fork, fixes #3685 2017-12-08 13:24:21 -08:00
Mike Perham
72fe3289ea Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
Mike Perham
b2a8d5bffe Remove unused function, #2850 2016-02-25 13:58:36 -08:00
Mike Perham
2c9f7662fc Freeze all string literals in source, fixes #2741
Tests pass and smoke test works perfectly.
2015-12-31 15:33:35 -08:00
Mike Perham
53e6b9e2df Test suite overhaul
Remove Redis mocking.  Minimize Redis flushing where possible.
2015-09-23 10:56:37 -07:00
Mike Perham
4433e685ba Add helper method to encapsulate hz check, #2431 2015-07-12 10:51:34 -07:00
Mike Perham
d54dc1c677 Refactor #1984 2014-10-06 08:53:06 -07:00
Chris TenHarmsel
5590669023 Added method to Util module to clean up process records that don't have
a matching heartbeat record, indicating that they're no longer alive.

Added call to this new util method in the Schedule::Poller.poll_interval
method because the number of live processes is used as a multiplier for
the default wait interval.  Since the value for poll_interval is
memoized this call to 'cleanup_dead_process_records' should only be
called once at startup.
2014-10-04 17:31:10 -05:00
Mike Perham
ba8c8a57b9 Rework process/worker data model.
We no longer have a global 'workers' set but rather a global 'processes' set.  Each process has its own workers hash, keyed by thread id.

Rely as much as possible on Redis key expiration to naturally prune any lingering data.  Process data only has a one minute TTL, with the heartbeat refreshing the TTL, so it will expire quickly after a process dies.
2014-03-07 22:41:10 -08:00
Mike Perham
babfdc96c5 Backport test suite to Minitest 4 so we can test against Rails 4. 2013-09-22 14:38:33 -07:00
Jake Mack
13d8fda00b Actually test what the test claims 2013-06-20 11:02:30 -07:00
Jake Mack
b0286efc2b Generate a random hex string as the process id since Process.pid is not supported on all platforms (specifically, does not work on Heroku) 2013-06-20 10:58:53 -07:00