skyrunner 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/skyrunner/version.rb +1 -1
- data/lib/skyrunner.rb +0 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acab7006b6eec4ef27bb95523a7731881a2c137a
|
4
|
+
data.tar.gz: b6d2dafafa9aa2c779c4ae5023720e32756924c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33db221875b2e2fb7f195ce792b96a6acb0405a2caa61f138c46cb29b66e67756eb54f26c3d59f207f1ce02518712aae4ec6266ced4f506b06fbabb4ce70596e
|
7
|
+
data.tar.gz: 2759e97bb2315a1f7307706524fa3ff87dd265acf498138d3085c22492c84eff062ea440112bd2f6fccd689dc1272434fd84a5170598e28e1d6715a893016061
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ To start a consumer
|
|
31
31
|
bundle exec rake skyrunner:consume
|
32
32
|
``
|
33
33
|
|
34
|
-
To shut down a consumer, send it SIGINT or SIGTERM.
|
34
|
+
To gracefully shut down a consumer, send it SIGINT or SIGTERM. It will finish up processing the messages it has de-queued before terminating.
|
35
35
|
|
36
36
|
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.
|
37
37
|
|
data/lib/skyrunner/version.rb
CHANGED
data/lib/skyrunner.rb
CHANGED
@@ -83,11 +83,7 @@ module SkyRunner
|
|
83
83
|
failed = false
|
84
84
|
|
85
85
|
table.batch_get(:all, received_messages.map { |m| m[1]["job_id"] }.uniq, consistent_read: true) do |record|
|
86
|
-
break if stop_consuming
|
87
|
-
|
88
86
|
received_messages.select { |m| m[1]["job_id"] == record["job_id"] }.each_with_index do |received_message|
|
89
|
-
break if stop_consuming
|
90
|
-
|
91
87
|
message = received_message[1]
|
92
88
|
job_id = message["job_id"]
|
93
89
|
|