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

1431 commits

Author SHA1 Message Date
Mike Perham
33846c849a Allow users to disable ID generation since some redis providers disable the CLIENT command, fixes 2017-06-21 04:54:18 -07:00
Mike Perham
7941d78f41 nil is a possibility? 2017-06-20 09:39:50 -07:00
Mike Perham
09fcc48b20 document and restructure this code because people continue to misunderstand it 2017-06-19 07:42:00 -07:00
Mike Perham
ad98a32cbc Update how delayed extensions are loaded, fixes 2017-06-16 08:47:34 -07:00
Mike Perham
980438c61d Add default Redis client identifier, 2017-06-16 08:40:43 -07:00
Mike Perham
b38bb6f676 polish 2017-06-07 10:26:44 -07:00
Alfonso Uceda Pompa
c02862bd97 Custom job_logger_class 2017-06-07 10:20:31 -07:00
PikachuEXE
7fe2515138 Fix overriding class_attribute core extension from ActiveSupport with Sidekiq one 2017-06-06 08:10:08 -07:00
Mike Perham
7beed4fc51 fix cli 2017-06-05 11:30:31 -07:00
Mike Perham
0c4c8c476f Remove core_ext usage 2017-06-05 10:45:39 -07:00
Mike Perham
0107ab287a Cache identity after daemonizing, fixes 2017-06-05 10:45:22 -07:00
Mike Perham
19e90ff57e Fix Redis Cluster issue with mget, fixes
Also, memoize the history lookup results.
2017-05-31 12:08:57 -07:00
Mike Perham
d7d810cc1a rework leader api change to avoid breaking processset#to_a 2017-05-26 10:35:19 -07:00
Mike Perham
79f452c68d Add support for showing the Sidekiq Enterprise cluster leader process in Web UI, fixes 2017-05-26 10:26:46 -07:00
Nate Berkopec
acdd35fb01 Document that anything in sidekiq_options can also be sent to push
Was wondering if enterprise-specific features worked here.
2017-05-25 13:00:42 -07:00
Mike Perham
528ca61ab2 inline stringify 2017-05-15 14:57:03 -07:00
Mike Perham
11028ed38b oops 2017-05-15 14:57:03 -07:00
Mike Perham
1b3f70a1e5 Move class_attribute impl into Sidekiq::Worker 2017-05-15 14:57:03 -07:00
Mike Perham
ddc40b2070 Avoid mutating the given hash in these cases 2017-05-15 14:57:03 -07:00
Mike Perham
c413379441 Push constantize impl to where it is used.
Putting it in the main module was a terrible idea.  I don’t see the need for a junk drawer module yet so just copy the impl.
2017-05-15 14:57:03 -07:00
Mike Perham
1d5b559be9 Sidekiq::Util is not available on client-side, need to promote, 2017-05-15 14:57:03 -07:00
Mike Perham
df99ca982e Remove Hash#{stringify,symbolize}_keys, 2017-05-15 14:57:03 -07:00
Mike Perham
f9781e1bac Move constantize to Sidekiq::Util,
I don’t believe we need the Psych patch anymore because Sidekiq 5 guarantees that jobs are executed within Rails::Executor so classes should load as normal.  This was not the case back in early 4.2.x, 4.2.0, 4.2.1, etc.
2017-05-15 14:57:03 -07:00
Mike Perham
1399963eb0 It turns out that a deep merge isn’t required,
All locale files are a top-level locale key with a Hash of (key, string) translations, nothing more iirc.
2017-05-15 14:57:03 -07:00
Mike Perham
73448e2e5f We don’t appear to use silence_warnings anymore, 2017-05-15 14:57:03 -07:00
Ben Woosley
fb8fdc3687 Extract Processor#log_context to ease extending what's logged ()
* Extract Processor#log_context to ease extending what's logged

This was previously exposed in JobLogger and Middleware::Server::Logging
but was inlined into Processor.
701e06224c

Useful, e.g. in this case:
https://github.com/mperham/sidekiq/issues/1786

* Move job hash context logic into Sidekiq::Logging
2017-05-10 11:56:36 -07:00
Ben Woosley
018283141a Rescue at the method level in JobLogger () 2017-05-08 12:50:36 -07:00
Rafael Fidelis
0d314b145c Update footer UTC time in pooling dashboard refresh () 2017-05-04 07:20:05 -07:00
Jacob Evelyn
3d4a819390 Fix race condition in Sidekiq API ()
Fixes .
2017-05-02 10:08:26 -07:00
Mike Perham
0c53921fc5 Pull in latest class_attribute to fix warnings when not using Rails 2017-05-01 12:07:10 -07:00
Johan Lundström
3b96430046 Improve parsing of HTTP_ACCEPT_LANGUAGE (continue Nate's work) ()
* Add test case for sv locale

* Use Rack::Utils to parse locale header

* Take "q" value into account

* Make '*' match the default locale.

* Add test for available_locales

* Correct test case sv -> en

* Add missing test cases for Safari requests

* Add missing require needed to run a single test file

* Reimplement WebHelpers#locale to handle regions in header

Implementation inspired by:

https://github.com/iain/http_accept_language/blob/master/lib/http_accept_language/parser.rb

Also see:

https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4

* Add docs and references

* Add failing test cases for pt-br, pt-pt, pt (examples taken from Chrome & Safari)

* Add more test cases for Mac + Chrome + UK English + US English

* Make test cases for 'pt-PT,pt;q=0.8,en-US;q=0.6,en;q=0.4' and 'pt-pt' pass

* Make special case 'ru,en' work (equal qvalues)
2017-05-01 10:47:51 -07:00
Mike Perham
1459ff3f5d Don’t display the secret bag when showing Sidekiq Enterprise’s encrypted jobs, since it is just random data. 2017-04-24 17:12:57 -07:00
Mike Perham
fb8916f4ec Formatting 2017-04-24 16:33:16 -07:00
Mike Perham
7385564bcd Freeze common strings to minimize allocations, 2017-04-14 13:06:46 -07:00
Mike Perham
2b38f0c4a8 bump 2017-04-14 09:37:29 -07:00
Mike Perham
9e826a05e1 Re-implement set to avoid TLS, shout out to 2017-04-05 10:56:06 -07:00
Mike Perham
5046b3d39e bump 2017-03-24 14:14:11 -07:00
Mike Perham
701584e24e Verify graceful handling of ill-formed job payloads, fixes
Sidekiq will better handle jobs with malformed payloads.  Any job which raises a JSON::ParserError will immediately move to the Dead set.  Update the API to degrade gracefully when trying to render bad JSON in the queue, scheduled or dead.  These payloads are most often from other languages where the JSON is being pieced together manually and pushed to Redis.
2017-03-24 11:59:48 -07:00
Mike Perham
773dd89c18 Merge branch 'master' into 5-0 2017-03-24 11:19:44 -07:00
Marc Boquet
d1510f9155 Validate 'at' argument for Sidekiq::Client.push ()
* Validate 'at' argument for Sidekiq::Client.push

* item['at'] shouldn't actually be nil
2017-03-23 11:05:20 -07:00
Mike Perham
d916feaa7a merge master 2017-03-22 11:22:45 -07:00
eigilsagafos
28618ec44a Ensure Rails module has #env () 2017-03-22 08:11:09 -07:00
Mike Perham
ed485e47e4 Make Sidekiq Web UI RTL-friendly ()
* Unminify rickshaw graph CSS so we can maintain it

* Initial BiDi support for the Web UI

BiDi means the web app can serve both LTR and RTL languages at the same time.

1. Bootstrap-RTL overrides Bootstrap 3.3 styles for RTL clients
2. Application CSS was preprocessed thru rtlcss and then hand-trimmed to contain only RTL-specific directives.
3. Dashboard was tweaked to hardcode LTR for footer and polling gadget

* Vendor bootstrap-rtl.css

* Various RTL style fixes, need to flip all pull-* elements

* Upgrade Rickshaw to latest, remove dupe CSS

* Add Arabic language (credit to Milena Novakova)
Add Hebrew placeholder
Added dir attribute to html tag

* changes

* Clean up HTTP header generation, add Content-Language response header

* Use correct locale for hebrew
2017-03-16 13:51:29 -07:00
Mike Perham
5806792716 merge master 2017-03-16 11:42:02 -07:00
Mike Perham
490032fd7f bump 2017-03-16 11:34:56 -07:00
Mike Perham
6e92b9cb50 Allow dead jobs which don’t have an associated error, 2017-03-16 11:33:24 -07:00
Mike Perham
456894f36e Allow killing of scheduled jobs, fixes 2017-03-16 11:05:29 -07:00
Mike Perham
3b5862492a Remove job duplication edge case with Sidekiq Pro, fixes
In , we saw how an IO exception in the logger could cause a job to fail and be deleted before it reached the RetryJobs block, causing job loss.  To fix this, we disabled job acknowledgement until job execution starts but this has the bad side effect of duplicating jobs if the user is running a reliable scheme and the error happens after the RetryJobs middleware but before execution starts.

Instead we flip the middleware ordering; logging now happens within the retry block.  We would lose context-specific logging within retry so we move the context log setup out of the middleware into the Processor.  With these changes, we can properly retry and acknowledge even if there are errors within the initial server middleware and executor calls.

This code path has been reimplemented in Sidekiq 5.0 so this change only applies to 4.x.
2017-03-15 10:03:47 -07:00
Mike Perham
67471e5cf2 polish bad json processing 2017-03-14 20:06:04 -07:00
Mike Perham
9e7cc9afda Warn when using the Testing API outside of the test env, fixes 2017-03-13 12:23:32 -07:00