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

36 commits

Author SHA1 Message Date
Michael DiScala
ebd06ec67a Add random string to process identity.
In environments with deterministic hostnames and PIDs (i.e. Heroku), the
current system for constructing a process's identity string produces
collisions (e.g. a new process can assume the identity of one that has
died). In order to address this, we add a random string to the identity string.
Issue #2071.
2014-12-31 20:09:01 +00:00
Artur Cygan
2d0bff6351 Further style improvements 2014-12-17 21:09:20 +01: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
24f5ba7029 Prefer DYNO name over system hostname on Heroku, fixes #1742 2014-05-29 21:26:11 -07:00
Mike Perham
b0aa136be6 Implement remote signals via heartbeat 2014-05-13 21:41:40 -07: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
bbe245e4ff Initial pass at heartbeat, still failing tests 2014-03-02 16:36:00 -08:00
Mike Perham
a7b422af9b Change watchdog to propagate exceptions so Sidekiq quickly dies, #1194. 2013-09-22 14:05:29 -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
Mike Perham
f04e1ecbec Use core_ext for constantize and stringify_keys 2012-10-27 12:48:34 -07:00
Mike Perham
c6cb222e96 cleanup cleanup 2012-09-16 07:28:25 -07:00
Mike Perham
4cc5514755 Cleanup 2012-09-16 07:27:49 -07:00
Mike Perham
ba2470e658 Increase default expiry, fixes #385 2012-09-08 19:50:03 -07:00
Mike Perham
1d3401afd6 Fix a few more Exception leaks 2012-08-29 20:20:20 -07:00
Mike Perham
36801315d6 Rework error handling to work with watchdog 2012-08-02 20:48:49 -07:00
Mike Perham
8c9f960a68 Prefer Sidekiq.logger, inject message context into all working logging 2012-05-15 19:44:35 -07:00
Mike Perham
81458138dd 24 -> 1 hr 2012-05-12 14:02:32 -07:00
Mike Perham
2561cbcd66 Initial pass at getting a worker logger. Not quite happy with the API yet. 2012-05-12 14:00:42 -07:00
Mike Perham
7c3be2d81b Rename constant, fixes #191 2012-05-12 13:32:16 -07:00
Mike Perham
7ec820e9cc Add 24 hr expiry, only register workers while working [#156]
Future work will use redis zsets to heartbeat Sidekiq processes
2012-04-24 07:15:29 -07:00
Mike Perham
74d0e5ec35 Upgrade to connection_pool 0.9.0
Remove all connection_pool usage of method_missing.
Change Sidekiq.redis API to require a block.
2012-03-14 09:56:13 -07:00
Mike Perham
8345a196c0 Remove PID hackery, GH-22 2012-03-06 20:18:16 -08:00
Mike Perham
9c22f8d159 Redirect stderr to logfile also, use nohup [fixes #64] 2012-02-29 20:50:18 -08:00
Mike Perham
bf377d44e8 Better logging, fixes GH-55 2012-02-25 13:43:53 -08:00
Mike Perham
00501031df One redis accessor to rule them all. 2012-02-17 13:39:36 -08:00
Mike Perham
2c83b74f27 Process.pid does not work on Heroku, #22 2012-02-15 12:30:31 -08:00
Mike Perham
b210dd788c Update Sidekiq logging to use standard Ruby logger 2012-02-14 09:00:26 -08:00
Mike Perham
f9af66edd7 Rework redis connections so that the manager and
the client use separate pools.

This is so the Rails app Sidekiq::Client and 
Sidekiq::Manager can use different configurations.

Also, fix issue where workers were not unregistered
in Redis upon shutdown.
2012-02-11 13:14:03 -08:00
Mike Perham
23651d5196 First pass at Resque-compatible processing stats 2012-02-10 23:16:12 -08:00
Mike Perham
f89eedf326 Add new sidekiq/testing feature.
This makes job processing synchronous when required.
2012-02-09 21:46:44 -08:00
Ryan LeCompte
1a028c4a2f introduce middleware for cleanup of encoded payloads 2012-02-07 17:18:28 -08:00
Mike Perham
92c51c5785 Add full multithreaded integration test for manager 2012-02-03 10:02:57 -08:00
Mike Perham
922d5f8dbe Add Sidekiq::Processor testing, with bug fixes 2012-01-26 12:45:04 -08:00
Mike Perham
5366506fe1 Server starts up now! 2012-01-22 16:01:46 -08:00
Mike Perham
3b8b655807 worker mgmt and msg dispatch 2012-01-22 11:32:38 -08:00