roundhouse-x 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.travis.yml +16 -0
- data/3.0-Upgrade.md +70 -0
- data/Changes.md +1127 -0
- data/Gemfile +27 -0
- data/LICENSE +7 -0
- data/README.md +52 -0
- data/Rakefile +9 -0
- data/bin/roundhouse +19 -0
- data/bin/roundhousectl +93 -0
- data/lib/generators/roundhouse/templates/worker.rb.erb +9 -0
- data/lib/generators/roundhouse/templates/worker_spec.rb.erb +6 -0
- data/lib/generators/roundhouse/templates/worker_test.rb.erb +8 -0
- data/lib/generators/roundhouse/worker_generator.rb +49 -0
- data/lib/roundhouse/actor.rb +39 -0
- data/lib/roundhouse/api.rb +859 -0
- data/lib/roundhouse/cli.rb +396 -0
- data/lib/roundhouse/client.rb +210 -0
- data/lib/roundhouse/core_ext.rb +105 -0
- data/lib/roundhouse/exception_handler.rb +30 -0
- data/lib/roundhouse/fetch.rb +154 -0
- data/lib/roundhouse/launcher.rb +98 -0
- data/lib/roundhouse/logging.rb +104 -0
- data/lib/roundhouse/manager.rb +236 -0
- data/lib/roundhouse/middleware/chain.rb +149 -0
- data/lib/roundhouse/middleware/i18n.rb +41 -0
- data/lib/roundhouse/middleware/server/active_record.rb +13 -0
- data/lib/roundhouse/middleware/server/logging.rb +40 -0
- data/lib/roundhouse/middleware/server/retry_jobs.rb +206 -0
- data/lib/roundhouse/monitor.rb +124 -0
- data/lib/roundhouse/paginator.rb +42 -0
- data/lib/roundhouse/processor.rb +159 -0
- data/lib/roundhouse/rails.rb +24 -0
- data/lib/roundhouse/redis_connection.rb +77 -0
- data/lib/roundhouse/scheduled.rb +115 -0
- data/lib/roundhouse/testing/inline.rb +28 -0
- data/lib/roundhouse/testing.rb +193 -0
- data/lib/roundhouse/util.rb +68 -0
- data/lib/roundhouse/version.rb +3 -0
- data/lib/roundhouse/web.rb +264 -0
- data/lib/roundhouse/web_helpers.rb +249 -0
- data/lib/roundhouse/worker.rb +90 -0
- data/lib/roundhouse.rb +177 -0
- data/roundhouse.gemspec +27 -0
- data/test/config.yml +9 -0
- data/test/env_based_config.yml +11 -0
- data/test/fake_env.rb +0 -0
- data/test/fixtures/en.yml +2 -0
- data/test/helper.rb +49 -0
- data/test/test_api.rb +521 -0
- data/test/test_cli.rb +389 -0
- data/test/test_client.rb +294 -0
- data/test/test_exception_handler.rb +55 -0
- data/test/test_fetch.rb +206 -0
- data/test/test_logging.rb +34 -0
- data/test/test_manager.rb +169 -0
- data/test/test_middleware.rb +160 -0
- data/test/test_monitor.rb +258 -0
- data/test/test_processor.rb +176 -0
- data/test/test_rails.rb +23 -0
- data/test/test_redis_connection.rb +127 -0
- data/test/test_retry.rb +390 -0
- data/test/test_roundhouse.rb +87 -0
- data/test/test_scheduled.rb +120 -0
- data/test/test_scheduling.rb +75 -0
- data/test/test_testing.rb +78 -0
- data/test/test_testing_fake.rb +240 -0
- data/test/test_testing_inline.rb +65 -0
- data/test/test_util.rb +18 -0
- data/test/test_web.rb +605 -0
- data/test/test_web_helpers.rb +52 -0
- data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
- data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
- data/web/assets/images/logo.png +0 -0
- data/web/assets/images/status/active.png +0 -0
- data/web/assets/images/status/idle.png +0 -0
- data/web/assets/images/status-sd8051fd480.png +0 -0
- data/web/assets/javascripts/application.js +83 -0
- data/web/assets/javascripts/dashboard.js +300 -0
- data/web/assets/javascripts/locales/README.md +27 -0
- data/web/assets/javascripts/locales/jquery.timeago.ar.js +96 -0
- data/web/assets/javascripts/locales/jquery.timeago.bg.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.bs.js +49 -0
- data/web/assets/javascripts/locales/jquery.timeago.ca.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.cs.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.cy.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.da.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.de.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.el.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.en-short.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.en.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.es.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.et.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.fa.js +22 -0
- data/web/assets/javascripts/locales/jquery.timeago.fi.js +28 -0
- data/web/assets/javascripts/locales/jquery.timeago.fr-short.js +16 -0
- data/web/assets/javascripts/locales/jquery.timeago.fr.js +17 -0
- data/web/assets/javascripts/locales/jquery.timeago.he.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.hr.js +49 -0
- data/web/assets/javascripts/locales/jquery.timeago.hu.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.hy.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.id.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.it.js +16 -0
- data/web/assets/javascripts/locales/jquery.timeago.ja.js +19 -0
- data/web/assets/javascripts/locales/jquery.timeago.ko.js +17 -0
- data/web/assets/javascripts/locales/jquery.timeago.lt.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.mk.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.nl.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.no.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.pl.js +31 -0
- data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +16 -0
- data/web/assets/javascripts/locales/jquery.timeago.pt.js +16 -0
- data/web/assets/javascripts/locales/jquery.timeago.ro.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.rs.js +49 -0
- data/web/assets/javascripts/locales/jquery.timeago.ru.js +34 -0
- data/web/assets/javascripts/locales/jquery.timeago.sk.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.sl.js +44 -0
- data/web/assets/javascripts/locales/jquery.timeago.sv.js +18 -0
- data/web/assets/javascripts/locales/jquery.timeago.th.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.tr.js +16 -0
- data/web/assets/javascripts/locales/jquery.timeago.uk.js +34 -0
- data/web/assets/javascripts/locales/jquery.timeago.uz.js +19 -0
- data/web/assets/javascripts/locales/jquery.timeago.zh-cn.js +20 -0
- data/web/assets/javascripts/locales/jquery.timeago.zh-tw.js +20 -0
- data/web/assets/stylesheets/application.css +746 -0
- data/web/assets/stylesheets/bootstrap.css +9 -0
- data/web/locales/cs.yml +68 -0
- data/web/locales/da.yml +68 -0
- data/web/locales/de.yml +69 -0
- data/web/locales/el.yml +68 -0
- data/web/locales/en.yml +77 -0
- data/web/locales/es.yml +69 -0
- data/web/locales/fr.yml +69 -0
- data/web/locales/hi.yml +75 -0
- data/web/locales/it.yml +69 -0
- data/web/locales/ja.yml +69 -0
- data/web/locales/ko.yml +68 -0
- data/web/locales/nl.yml +68 -0
- data/web/locales/no.yml +69 -0
- data/web/locales/pl.yml +59 -0
- data/web/locales/pt-br.yml +68 -0
- data/web/locales/pt.yml +67 -0
- data/web/locales/ru.yml +75 -0
- data/web/locales/sv.yml +68 -0
- data/web/locales/ta.yml +75 -0
- data/web/locales/zh-cn.yml +68 -0
- data/web/locales/zh-tw.yml +68 -0
- data/web/views/_footer.erb +22 -0
- data/web/views/_job_info.erb +84 -0
- data/web/views/_nav.erb +66 -0
- data/web/views/_paging.erb +23 -0
- data/web/views/_poll_js.erb +5 -0
- data/web/views/_poll_link.erb +7 -0
- data/web/views/_status.erb +4 -0
- data/web/views/_summary.erb +40 -0
- data/web/views/busy.erb +90 -0
- data/web/views/dashboard.erb +75 -0
- data/web/views/dead.erb +34 -0
- data/web/views/layout.erb +31 -0
- data/web/views/morgue.erb +71 -0
- data/web/views/queue.erb +45 -0
- data/web/views/queues.erb +27 -0
- data/web/views/retries.erb +74 -0
- data/web/views/retry.erb +34 -0
- data/web/views/scheduled.erb +54 -0
- data/web/views/scheduled_job_info.erb +8 -0
- metadata +404 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 58561b1a622c1151e562d2b5663f76028f59499f
|
4
|
+
data.tar.gz: 4ae16eb8c3c77399fb530560d12a1fbc39d0e695
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 734f9b44dc5d7198264ea151163c0eb066d4ea151d88380b7060fd7a2d315251deb913a829de8cd496f95257f14f975d07fbaa62d31fece29aac2ab8a2bd6b1f
|
7
|
+
data.tar.gz: a8de13c124fed036d51df2d58b02a60c07885d1849ef9bbd93d3b1d2fcc9582945fc7fa571cdeec00578354c41dd9b93b9b38d46c990057fe5f7ce4c6e8d0a4f
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/3.0-Upgrade.md
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
# Upgrading to Sidekiq 3.0
|
2
|
+
|
3
|
+
Sidekiq 3.0 brings several new features but also removes old APIs and
|
4
|
+
changes a few data elements in Redis. To upgrade cleanly:
|
5
|
+
|
6
|
+
* Upgrade to the latest Sidekiq 2.x and run it for a few weeks.
|
7
|
+
`gem 'sidekiq', '< 3'`
|
8
|
+
This is only needed if you have retries pending.
|
9
|
+
* 3rd party gems which use **client-side middleware** will need to update
|
10
|
+
due to an API change. The Redis connection for a particular job is
|
11
|
+
passed thru the middleware to handle sharding where jobs can
|
12
|
+
be pushed to different redis server instances.
|
13
|
+
|
14
|
+
`def call(worker_class, msg, queue, redis_pool)`
|
15
|
+
|
16
|
+
Client-side middleware should use `redis_pool.with { |conn| ... }` to
|
17
|
+
perform Redis operations and **not** `Sidekiq.redis`.
|
18
|
+
* If you used the capistrano integration, you'll need to pull in the
|
19
|
+
new [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq)
|
20
|
+
gem and use it in your deploy.rb.
|
21
|
+
* API changes:
|
22
|
+
- `Sidekiq::Client.registered_workers` replaced by `Sidekiq::Workers.new`
|
23
|
+
- `Sidekiq::Client.registered_queues` replaced by `Sidekiq::Queue.all`
|
24
|
+
- `Sidekiq::Worker#retries_exhausted` replaced by `Sidekiq::Worker.sidekiq_retries_exhausted`
|
25
|
+
- `Sidekiq::Workers#each` has changed significantly with a reworking
|
26
|
+
of Sidekiq's internal process/thread data model.
|
27
|
+
* `sidekiq/api` is no longer automatically required. If your code uses
|
28
|
+
the API, you will need to require it.
|
29
|
+
* Redis-to-Go is no longer transparently activated on Heroku so as to not play
|
30
|
+
favorites with any particular Redis service. You need to set a config option
|
31
|
+
for your app:
|
32
|
+
`heroku config:set REDIS_PROVIDER=REDISTOGO_URL`. You may also use
|
33
|
+
the generic `REDIS_URL`. See
|
34
|
+
[Advanced Options: Setting the Location of your Redis server][1]
|
35
|
+
for details.
|
36
|
+
* Anyone using Airbrake, Honeybadger, Exceptional or ExceptionNotifier
|
37
|
+
will need to update their error gem version to the latest to pull in
|
38
|
+
Sidekiq support. Sidekiq will not provide explicit support for these
|
39
|
+
services so as to not play favorites with any particular error service.
|
40
|
+
* MRI 1.9 is no longer officially supported. Sidekiq's official
|
41
|
+
support policy is to support the current and previous major releases
|
42
|
+
of MRI and Rails. As of February 2014, that's MRI 2.1, MRI 2.0, JRuby 1.7, Rails 4.0
|
43
|
+
and Rails 3.2. I will consider PRs to fix issues found by users for
|
44
|
+
other platforms/versions.
|
45
|
+
|
46
|
+
## Error Service Providers
|
47
|
+
|
48
|
+
If you previously provided a middleware to capture job errors, you
|
49
|
+
should instead provide a global error handler with Sidekiq 3.0. This
|
50
|
+
ensures **any** error within Sidekiq will be logged appropriately, not
|
51
|
+
just during job execution.
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
if Sidekiq::VERSION < '3'
|
55
|
+
# old behavior
|
56
|
+
Sidekiq.configure_server do |config|
|
57
|
+
config.server_middleware do |chain|
|
58
|
+
chain.add MyErrorService::Middleware
|
59
|
+
end
|
60
|
+
end
|
61
|
+
else
|
62
|
+
Sidekiq.configure_server do |config|
|
63
|
+
config.error_handlers << proc {|ex,context| MyErrorService.notify(ex, context) }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
```
|
67
|
+
|
68
|
+
Your error handler must respond to `call(exception, context_hash)`.
|
69
|
+
|
70
|
+
[1]: https://github.com/mperham/sidekiq/wiki/Advanced-Options#via-env-variable
|