Last active
March 7, 2017 16:44
-
-
Save awolfson/6070141c93653dd41ddb79aa8397e86e to your computer and use it in GitHub Desktop.
ActiveJob doesn't raise error unless you tell it to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ActiveJob] Enqueued ExceptionJob (Job ID: 38252bdb-fa2f-4508-8a8c-7b253f84878f) to Async(default) | |
| [ActiveJob] [ExceptionJob] [38252bdb-fa2f-4508-8a8c-7b253f84878f] Performing ExceptionJob from Async(default) | |
| [ActiveJob] [ExceptionJob] [38252bdb-fa2f-4508-8a8c-7b253f84878f] Performed ExceptionJob from Async(default) in 12.2ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExceptionJob < ApplicationJob | |
| def perform | |
| raise StandardError | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| irb(main):001:0> ExceptionJob.perform_later | |
| Enqueued ExceptionJob (Job ID: 88db7855-2d05-4528-9055-26e2800cd797) to Async(default) | |
| Performing ExceptionJob from Async(default) | |
| => #<ExceptionJob:0x007fee2f92a430 @arguments=[], @job_id="88db7855-2d05-4528-9055-26e2800cd797", @queue_name="default", @priority=nil, @executions=0, @provider_job_id="f29617bd-ca3d-4f95-9a66-6c2ab4d2374c"> | |
| irb(main):003:0> Performed ExceptionJob from Async(default) in 12.15ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment