sqskiq 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sqskiq/signal_handler.rb +19 -0
  2. metadata +4 -3
@@ -0,0 +1,19 @@
1
+ module Sqskiq
2
+ module SignalHandler
3
+ include Celluloid
4
+ include Celluloid::Notifications
5
+
6
+ @shutting_down = false
7
+
8
+ def subscribe_for_shutdown
9
+ subscribe('SIGINT', :shutting_down)
10
+ subscribe('TERM', :shutting_down)
11
+ subscribe('SIGTERM', :shutting_down)
12
+ end
13
+
14
+ def shutting_down(signal)
15
+ @shutting_down = true
16
+ end
17
+
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqskiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -75,7 +75,7 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
- description: sqskiq
78
+ description: Sidekiq-like Ruby background processing using Amazon SQS
79
79
  email: ri.vanlazar@gmail.com
80
80
  executables: []
81
81
  extensions: []
@@ -89,11 +89,12 @@ files:
89
89
  - lib/sqskiq/worker.rb
90
90
  - lib/sqskiq/batch_process.rb
91
91
  - lib/sqskiq/aws.rb
92
+ - lib/sqskiq/signal_handler.rb
92
93
  - spec/manager_spec.rb
93
94
  - spec/processor_spec.rb
94
95
  - spec/spec_helper.rb
95
96
  - spec/sqskiq_spec.rb
96
- homepage: http://rubygems.org/gems/sqskiq
97
+ homepage: https://github.com/ricardolazaro/sqskiq
97
98
  licenses: []
98
99
  post_install_message:
99
100
  rdoc_options: []