skyrunner 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de70e60abe085c386c83a7c28304636680a2f6dd
4
- data.tar.gz: d80cbea2d0674077f3d731f4de3402f7ff2045c2
3
+ metadata.gz: e564830013db950f0c70df94fb424e4f06c258aa
4
+ data.tar.gz: a142faeb1e1fe866666205fb44f325c53b413cea
5
5
  SHA512:
6
- metadata.gz: 9408f2d9daf8e8b644625a5e77f9fd933cc734ae611c2a293a27b7b44605c78fc52caca4205e8d5e450bb6d361e27839e5d0ac8033829b3d5dfaead674f915e9
7
- data.tar.gz: 8b5410deae5c32154e343e6e09c481d167d01f6c56fe8e3911a1d20dedb27465c963b8fcd97657ac062638f1b6d4bb062b71703694e401e7ebe9ea57918098e1
6
+ metadata.gz: ebfd5422a912dfed0cdb2e1740428275f9354c8c0c0a9ebb2daaae29c4bba9f87f198e3eec1e24ef5c88e30941699fde2de9d2ba5b76f79e0c16d9c09a25ef13
7
+ data.tar.gz: f01549d5eb06297059ca91cabd590edf8a49f437f64736b863fd4ddc856b2f286939c0764b1765d55b75946b870e3e94eeb3541fec4ee6e5df26c65c17f5f14b
data/README.md CHANGED
@@ -17,7 +17,7 @@ To set up with Rails:
17
17
  bundle exec rails g sky_runner:install
18
18
  ```
19
19
 
20
- And customize `config/initializers/skyrunner.rb`
20
+ Customize `config/initializers/skyrunner.rb`. Update `lib/tasks/skyrunner.rake` to do what you want if there are exceptions during a task.
21
21
 
22
22
  To initialize DynamoDB & SQS:
23
23
 
@@ -33,5 +33,5 @@ bundle exec rake skyrunner:consume
33
33
 
34
34
  See `jobs/example_job.rb` for an example job. To run a job, just call `execute!` on the job, passing any named job arguments you want. The job class should implement the method `run`. This method will get passed the job arguments. For each task you want consumers to run, `run` should yield an array of two elements, the first being the name of the method on the job class to run for the task, and the second a Hash of method arguments.
35
35
 
36
- You can specify `on_complete` and `on_failure` methods to call when the tasks are all completed, or if any of them fail, respectively. These methods will also be passed the original job arguments.
36
+ You can specify `on_complete` and `on_failure` method(s) to call when the tasks are all completed, or if any of them fail, respectively. These methods will also be passed the original job arguments. Importantly, the completion method is guaranteed to be called once and only once, when the final task has been completed.
37
37
 
@@ -6,7 +6,12 @@ namespace :skyrunner do
6
6
 
7
7
  desc "Creates DynamoDB table and SQS queue for SkyRunner."
8
8
  task consume: :environment do
9
- SkyRunner.consume!
9
+ SkyRunner.consume! do |exception|
10
+ if exception
11
+ # TODO customize this with what you want to do if there is an exception.
12
+ # (For example, send to Airbrake.)
13
+ end
14
+ end
10
15
  end
11
16
 
12
17
  desc "Purges and re-creates DynamoDB table and SQS queue for SkyRunner. (Warning: destructive!)"
@@ -1,3 +1,3 @@
1
1
  module Skyrunner
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skyrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Fodor