Abdelkader Boudih
c0bf21a8b3
Introduce chain#prepend possible fix for #2020
2014-10-28 18:10:09 +00:00
Mike Perham
83aea0690e
Explicitly pass Redis associated with this job
...
When pushing a job, the middleware should be able to access the Redis instance associated with that job. Previously, Sidekiq was limited to one global Redis instance. Now that we want to support sharding, we have to explicitly pass the instance in OR hack up APIs with thread local variables. Explicit is better.
2014-03-25 21:38:17 -07:00
Mike Perham
e087bb3160
Fix client middleware sample
2013-11-14 20:30:11 -08:00
Mike Perham
e63a9d8863
Add tests for new client instances
2013-10-25 21:07:54 -07:00
Mike Perham
c7c8044d75
Minor refactoring of chain
2013-09-12 14:14:17 -07:00
David Czarnecki
3f0d7e32a4
Allow for default number of retry attempts to be set for RetryJobs middleware.
...
* Adds `max_retries` option to RetryJobs middleware. Default is still 25. This
way you can still retry jobs, but not have it spread out over such a long
period.
Modify `Sidekiq::Middleware::Chain#add` semantics
* If middleware class already exists in the chain, remove the
existing class and add it with possibly new arguments.
2013-08-01 16:23:50 -04:00
Mike Perham
c7b0a349ae
Make Chain enumerable
2013-07-27 16:14:07 -07:00
Jack Royal-Gordon
54da57aef9
Fix issue causing middleware chain corruption when inserting before or after
...
#delete_if returns the chain, not the entry deleted. Changed to use #index followed by #delete_at.
2012-12-24 23:15:23 -08:00
Jack Royal-Gordon
aeb8177c37
Correct bug when deleting existing element from chain
...
Use #delete_if instead of #delete
2012-12-20 12:52:38 -08:00
Jack Royal-Gordon
9d9f9732a2
Change behavior to move an existing middleware to the requested position rather than ignoring existing middle wares.
2012-12-19 09:18:28 -08:00
Jack Royal-Gordon
71931fc0e1
Change #add_before and #add_after to #insert_before and #insert_after
2012-12-19 08:40:36 -08:00
Jack Royal-Gordon
feb040717f
Fix error in both new methods by changing 'klass' references to 'newklass'.
2012-12-18 22:00:34 -08:00
Jack Royal-Gordon
7b5c3b02cb
Add chain#add_before and chain#add_after to facilitate insertion into the middle of the Middleware chains.
2012-12-18 21:42:23 -08:00
Mike Perham
94a8993d65
Update old middleware chain rdoc
2012-07-17 11:06:10 -07:00
Mike Perham
8adba07887
Simplify middleware testing
2012-03-17 17:59:18 -07:00
Mike Perham
8ee8137caa
Refactor options to be globally available for things like
...
connection pool sizing.
2012-02-19 13:05:19 -08:00
Mike Perham
92c1942363
Documentation update
2012-02-18 13:08:53 -08:00
Mike Perham
6af6a86369
Refactor middleware API, this will break anyone using the old API.
...
e.g.
Sidekiq::Processor.middleware => Sidekiq.server_middleware
Sidekiq::Client.middleware => Sidekiq.client_middleware
2012-02-18 12:12:05 -08:00
Mike Perham
fd46c5471a
Client workers can now define associated queue
...
Configure client middleware chain by default
Middleware entries should be unique
Change client#push to return boolean based on pushed or not.
2012-02-10 20:20:01 -08:00
Mike Perham
a1f78816a7
Implement generic Ruby support via simple require flag
...
Various cleanups
It's "assert_equal(expected, actual)"
2012-02-09 20:32:59 -08:00
Ryan LeCompte
35c0ae5067
add middleware classes
2012-02-08 17:04:19 -08:00