active_job_channel 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/{app/channels → lib}/active_job_channel/channel.rb +1 -1
- data/lib/active_job_channel/engine.rb +12 -1
- data/lib/active_job_channel/version.rb +1 -1
- data/lib/active_job_channel.rb +1 -7
- data/spec/dummy/log/test.log +180 -0
- metadata +2 -4
- data/app/assets/javascripts/active_job_channel.js +0 -27
- data/config/routes.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 320dedafebbd7d4642c253ffe2e4293aa6d9ca20766000877e2fef2659751b6d
|
4
|
+
data.tar.gz: 2b38d9bc1f43db7580565df60ebccee630144322f54d96177626178273cb028f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f77cd6a65e6b4573ff228ec71b7560f2fac1a29c73297a9e87add526bea6bb3015502b1b3ba139c44a84ded923723549ae4691d2d14fd0866a0e713df051a109
|
7
|
+
data.tar.gz: 97098bdf643d30d8048672957eda0ea6dabaf15fbd7f12a60843d78d727c002e3af8611120abb6170e600c5efae93f31eb2bcd9fdd7e2c2e629419e823c6d3ff
|
data/README.md
CHANGED
@@ -13,6 +13,9 @@ Uses `ActionCable` to alert front-end users of finished `ActiveJobs`
|
|
13
13
|
from background `ActiveJob` processes. Currently only PostgreSQL and Redis
|
14
14
|
are supported.
|
15
15
|
|
16
|
+
3. (Optional) If you need authorization for notifications, [set up your own
|
17
|
+
`ApplicationCable::Connection`](http://guides.rubyonrails.org/action_cable_overview.html#server-side-components-connections)
|
18
|
+
|
16
19
|
3. Include `active_job_channel.js` in your layouts
|
17
20
|
|
18
21
|
```ruby
|
@@ -60,5 +63,8 @@ is required for `ActionCable` to handle notifications from background
|
|
60
63
|
* Because `ActiveJob` does not know when a job has permanently failed,
|
61
64
|
`ActiveJobChannel` sends notfications for each failure, retried or final
|
62
65
|
|
66
|
+
## Todo
|
67
|
+
- Better default front-end notification behavior
|
68
|
+
|
63
69
|
## License
|
64
70
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -1,5 +1,16 @@
|
|
1
1
|
module ActiveJobChannel
|
2
2
|
class Engine < ::Rails::Engine
|
3
|
-
|
3
|
+
ActiveSupport.on_load(:active_job) do
|
4
|
+
require 'active_job_channel/broadcaster'
|
5
|
+
ActiveJob::Base.send :extend, ActiveJobChannel::Broadcaster::ClassMethods
|
6
|
+
end
|
7
|
+
|
8
|
+
ActiveSupport.on_load(:action_cable) do
|
9
|
+
require 'active_job_channel/channel'
|
10
|
+
end
|
11
|
+
|
12
|
+
routes.draw do
|
13
|
+
mount ActionCable.server => '/cable/active_job_channel'
|
14
|
+
end
|
4
15
|
end
|
5
16
|
end
|
data/lib/active_job_channel.rb
CHANGED
@@ -1,10 +1,4 @@
|
|
1
1
|
require 'active_job_channel/engine'
|
2
|
-
require 'active_job_channel/broadcaster'
|
3
|
-
require 'action_cable/engine'
|
4
|
-
require 'active_job/railtie'
|
5
2
|
|
6
3
|
# Top-level namespace
|
7
|
-
module ActiveJobChannel
|
8
|
-
end
|
9
|
-
|
10
|
-
ActiveJob::Base.send :extend, ActiveJobChannel::Broadcaster::ClassMethods
|
4
|
+
module ActiveJobChannel; end
|
data/spec/dummy/log/test.log
CHANGED
@@ -9784,3 +9784,183 @@ Diff:[0m
|
|
9784
9784
|
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:22:in `<top (required)>'
|
9785
9785
|
/Users/shanecav/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
|
9786
9786
|
/Users/shanecav/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
|
9787
|
+
[ActiveJob] [ApplicationJob] [5e24f140-7af1-4db0-9d7c-22dc5fd520a4] Performing ApplicationJob (Job ID: 5e24f140-7af1-4db0-9d7c-22dc5fd520a4) from Async(default)
|
9788
|
+
[ActiveJob] [ApplicationJob] [5e24f140-7af1-4db0-9d7c-22dc5fd520a4] Performed ApplicationJob (Job ID: 5e24f140-7af1-4db0-9d7c-22dc5fd520a4) from Async(default) in 0.12ms
|
9789
|
+
[ActiveJob] [ApplicationJob] [89e9cad6-3c82-49da-bf18-dd1a7f269b31] Performing ApplicationJob (Job ID: 89e9cad6-3c82-49da-bf18-dd1a7f269b31) from Async(default)
|
9790
|
+
[ActiveJob] [ApplicationJob] [89e9cad6-3c82-49da-bf18-dd1a7f269b31] Performed ApplicationJob (Job ID: 89e9cad6-3c82-49da-bf18-dd1a7f269b31) from Async(default) in 0.11ms
|
9791
|
+
[ActiveJob] [ApplicationJob] [c91e4eb3-ea92-4eb1-828d-ffd9a1b8bb5b] Performing ApplicationJob (Job ID: c91e4eb3-ea92-4eb1-828d-ffd9a1b8bb5b) from Async(default)
|
9792
|
+
[ActiveJob] [ApplicationJob] [c91e4eb3-ea92-4eb1-828d-ffd9a1b8bb5b] Error performing ApplicationJob (Job ID: c91e4eb3-ea92-4eb1-828d-ffd9a1b8bb5b) from Async(default) in 0.79ms: StandardError (StandardError):
|
9793
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:141:in `block in and_raise'
|
9794
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:683:in `block in call'
|
9795
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:682:in `map'
|
9796
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:682:in `call'
|
9797
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:565:in `invoke_incrementing_actual_calls_by'
|
9798
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:422:in `invoke'
|
9799
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:179:in `message_received'
|
9800
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:326:in `message_received'
|
9801
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:77:in `proxy_method_invoked'
|
9802
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:64:in `block (2 levels) in define_proxy_method'
|
9803
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/recorder.rb:257:in `block in observe!'
|
9804
|
+
/Users/shanecav/Code/active_job_channel/spec/dummy/app/jobs/application_job.rb:5:in `perform'
|
9805
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/execution.rb:37:in `block in perform_now'
|
9806
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
|
9807
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.9.1/lib/i18n.rb:265:in `with_locale'
|
9808
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'
|
9809
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `instance_exec'
|
9810
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
|
9811
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:24:in `block (4 levels) in <module:Logging>'
|
9812
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
|
9813
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
|
9814
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
|
9815
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:23:in `block (3 levels) in <module:Logging>'
|
9816
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:44:in `block in tag_logger'
|
9817
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in `block in tagged'
|
9818
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:26:in `tagged'
|
9819
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in `tagged'
|
9820
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:44:in `tag_logger'
|
9821
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:20:in `block (2 levels) in <module:Logging>'
|
9822
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `instance_exec'
|
9823
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
|
9824
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
|
9825
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/execution.rb:33:in `perform_now'
|
9826
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/execution.rb:16:in `perform_now'
|
9827
|
+
/Users/shanecav/Code/active_job_channel/spec/jobs/application_job_spec.rb:18:in `block (3 levels) in <top (required)>'
|
9828
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'
|
9829
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'
|
9830
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb:27:in `with_matcher'
|
9831
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
|
9832
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/expectation_target.rb:65:in `to'
|
9833
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/expectation_target.rb:101:in `to'
|
9834
|
+
/Users/shanecav/Code/active_job_channel/spec/jobs/application_job_spec.rb:18:in `block (2 levels) in <top (required)>'
|
9835
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:254:in `instance_exec'
|
9836
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:254:in `block in run'
|
9837
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
|
9838
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
|
9839
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `block in run'
|
9840
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:604:in `run_around_example_hooks_for'
|
9841
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `run'
|
9842
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
|
9843
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
|
9844
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:251:in `run'
|
9845
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:628:in `block in run_examples'
|
9846
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `map'
|
9847
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `run_examples'
|
9848
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:590:in `run'
|
9849
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
|
9850
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `map'
|
9851
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
|
9852
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1896:in `with_suite_hooks'
|
9853
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:113:in `block in run_specs'
|
9854
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/reporter.rb:79:in `report'
|
9855
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:112:in `run_specs'
|
9856
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:87:in `run'
|
9857
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:71:in `run'
|
9858
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:45:in `invoke'
|
9859
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/exe/rspec:4:in `<top (required)>'
|
9860
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/rspec:23:in `load'
|
9861
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/rspec:23:in `<top (required)>'
|
9862
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/exec.rb:75:in `load'
|
9863
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/exec.rb:75:in `kernel_load'
|
9864
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/exec.rb:28:in `run'
|
9865
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:424:in `exec'
|
9866
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
|
9867
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
|
9868
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
|
9869
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:27:in `dispatch'
|
9870
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
|
9871
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:18:in `start'
|
9872
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:30:in `block in <top (required)>'
|
9873
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/friendly_errors.rb:122:in `with_friendly_errors'
|
9874
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:22:in `<top (required)>'
|
9875
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
|
9876
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
|
9877
|
+
[ActiveJob] [ApplicationJob] [45aacb90-a465-4b7e-b9de-33b77b328c94] Performing ApplicationJob (Job ID: 45aacb90-a465-4b7e-b9de-33b77b328c94) from Async(default)
|
9878
|
+
[ActiveJob] [ApplicationJob] [45aacb90-a465-4b7e-b9de-33b77b328c94] Performed ApplicationJob (Job ID: 45aacb90-a465-4b7e-b9de-33b77b328c94) from Async(default) in 0.12ms
|
9879
|
+
[ActiveJob] [ApplicationJob] [a780bf5a-068a-48c3-81bc-8bd34920765e] Performing ApplicationJob (Job ID: a780bf5a-068a-48c3-81bc-8bd34920765e) from Async(default)
|
9880
|
+
[ActiveJob] [ApplicationJob] [a780bf5a-068a-48c3-81bc-8bd34920765e] Performed ApplicationJob (Job ID: a780bf5a-068a-48c3-81bc-8bd34920765e) from Async(default) in 0.1ms
|
9881
|
+
[ActiveJob] [ApplicationJob] [e978ce15-1344-425e-9847-f11cf0eed408] Performing ApplicationJob (Job ID: e978ce15-1344-425e-9847-f11cf0eed408) from Async(default)
|
9882
|
+
[ActiveJob] [ApplicationJob] [e978ce15-1344-425e-9847-f11cf0eed408] Error performing ApplicationJob (Job ID: e978ce15-1344-425e-9847-f11cf0eed408) from Async(default) in 0.52ms: StandardError (StandardError):
|
9883
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:141:in `block in and_raise'
|
9884
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:683:in `block in call'
|
9885
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:682:in `map'
|
9886
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:682:in `call'
|
9887
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:565:in `invoke_incrementing_actual_calls_by'
|
9888
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/message_expectation.rb:422:in `invoke'
|
9889
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:179:in `message_received'
|
9890
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/proxy.rb:326:in `message_received'
|
9891
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:77:in `proxy_method_invoked'
|
9892
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/method_double.rb:64:in `block (2 levels) in define_proxy_method'
|
9893
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-mocks-3.7.0/lib/rspec/mocks/any_instance/recorder.rb:257:in `block in observe!'
|
9894
|
+
/Users/shanecav/Code/active_job_channel/spec/dummy/app/jobs/application_job.rb:5:in `perform'
|
9895
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/execution.rb:37:in `block in perform_now'
|
9896
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
|
9897
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/i18n-0.9.1/lib/i18n.rb:265:in `with_locale'
|
9898
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'
|
9899
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `instance_exec'
|
9900
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
|
9901
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:24:in `block (4 levels) in <module:Logging>'
|
9902
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
|
9903
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
|
9904
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
|
9905
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:23:in `block (3 levels) in <module:Logging>'
|
9906
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:44:in `block in tag_logger'
|
9907
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in `block in tagged'
|
9908
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:26:in `tagged'
|
9909
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/tagged_logging.rb:69:in `tagged'
|
9910
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:44:in `tag_logger'
|
9911
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/logging.rb:20:in `block (2 levels) in <module:Logging>'
|
9912
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `instance_exec'
|
9913
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
|
9914
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:135:in `run_callbacks'
|
9915
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/execution.rb:33:in `perform_now'
|
9916
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activejob-5.1.4/lib/active_job/execution.rb:16:in `perform_now'
|
9917
|
+
/Users/shanecav/Code/active_job_channel/spec/jobs/application_job_spec.rb:18:in `block (3 levels) in <top (required)>'
|
9918
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/matchers/built_in/raise_error.rb:52:in `matches?'
|
9919
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb:50:in `block in handle_matcher'
|
9920
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb:27:in `with_matcher'
|
9921
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/handler.rb:48:in `handle_matcher'
|
9922
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/expectation_target.rb:65:in `to'
|
9923
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-expectations-3.7.0/lib/rspec/expectations/expectation_target.rb:101:in `to'
|
9924
|
+
/Users/shanecav/Code/active_job_channel/spec/jobs/application_job_spec.rb:18:in `block (2 levels) in <top (required)>'
|
9925
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:254:in `instance_exec'
|
9926
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:254:in `block in run'
|
9927
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `block in with_around_and_singleton_context_hooks'
|
9928
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `block in with_around_example_hooks'
|
9929
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `block in run'
|
9930
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:604:in `run_around_example_hooks_for'
|
9931
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/hooks.rb:466:in `run'
|
9932
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:457:in `with_around_example_hooks'
|
9933
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:500:in `with_around_and_singleton_context_hooks'
|
9934
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example.rb:251:in `run'
|
9935
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:628:in `block in run_examples'
|
9936
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `map'
|
9937
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:624:in `run_examples'
|
9938
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/example_group.rb:590:in `run'
|
9939
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (3 levels) in run_specs'
|
9940
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `map'
|
9941
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:118:in `block (2 levels) in run_specs'
|
9942
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/configuration.rb:1896:in `with_suite_hooks'
|
9943
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:113:in `block in run_specs'
|
9944
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/reporter.rb:79:in `report'
|
9945
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:112:in `run_specs'
|
9946
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:87:in `run'
|
9947
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:71:in `run'
|
9948
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/lib/rspec/core/runner.rb:45:in `invoke'
|
9949
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rspec-core-3.7.0/exe/rspec:4:in `<top (required)>'
|
9950
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/rspec:23:in `load'
|
9951
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/rspec:23:in `<top (required)>'
|
9952
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/exec.rb:75:in `load'
|
9953
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/exec.rb:75:in `kernel_load'
|
9954
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli/exec.rb:28:in `run'
|
9955
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:424:in `exec'
|
9956
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
|
9957
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
|
9958
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
|
9959
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:27:in `dispatch'
|
9960
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
|
9961
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/cli.rb:18:in `start'
|
9962
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:30:in `block in <top (required)>'
|
9963
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/site_ruby/2.4.0/bundler/friendly_errors.rb:122:in `with_friendly_errors'
|
9964
|
+
/Users/shanecav/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.0/exe/bundle:22:in `<top (required)>'
|
9965
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
|
9966
|
+
/Users/shanecav/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_job_channel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Cavanaugh
|
@@ -90,11 +90,9 @@ files:
|
|
90
90
|
- MIT-LICENSE
|
91
91
|
- README.md
|
92
92
|
- Rakefile
|
93
|
-
- app/assets/javascripts/active_job_channel.js
|
94
|
-
- app/channels/active_job_channel/channel.rb
|
95
|
-
- config/routes.rb
|
96
93
|
- lib/active_job_channel.rb
|
97
94
|
- lib/active_job_channel/broadcaster.rb
|
95
|
+
- lib/active_job_channel/channel.rb
|
98
96
|
- lib/active_job_channel/engine.rb
|
99
97
|
- lib/active_job_channel/version.rb
|
100
98
|
- spec/dummy/Rakefile
|
@@ -1,27 +0,0 @@
|
|
1
|
-
//= require action_cable
|
2
|
-
|
3
|
-
(function() {
|
4
|
-
// Setup ActionCable connection
|
5
|
-
this.App || (this.App = {});
|
6
|
-
App.active_job_channel_cable = ActionCable.createConsumer('/cable/active_job_channel');
|
7
|
-
|
8
|
-
// Setup up ActiveJobChannel received method
|
9
|
-
this.ActiveJobChannel || (this.ActiveJobChannel = {});
|
10
|
-
ActiveJobChannel.received = ActiveJobChannel.received || function(data) {
|
11
|
-
var status = data.status;
|
12
|
-
var job_name = data.job_name;
|
13
|
-
if (status === 'success') { console.log(job_name + ' succeeded!'); }
|
14
|
-
else if (status === 'failure') { console.log(job_name + ' failed!'); }
|
15
|
-
else { console.error('Job status could not be determined'); }
|
16
|
-
}
|
17
|
-
|
18
|
-
}).call(this);
|
19
|
-
|
20
|
-
// Setup ActionCable subscriber
|
21
|
-
document.addEventListener("DOMContentLoaded", function (_event) {
|
22
|
-
const CHANNEL = "::ActiveJobChannel::Channel";
|
23
|
-
App.active_job_channel = App.active_job_channel_cable.subscriptions.create(
|
24
|
-
{ channel: CHANNEL },
|
25
|
-
{ received: function (data) { ActiveJobChannel.received(data); } }
|
26
|
-
);
|
27
|
-
});
|
data/config/routes.rb
DELETED