squeese 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/squeese.rb +3 -5
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -41,7 +41,7 @@ module Squeese
41
41
  end
42
42
 
43
43
  def work_one_job
44
- msg = queue.receive
44
+ msg = queue.pop
45
45
 
46
46
  # don't be CPU greedy on a quiet queue
47
47
  unless msg
@@ -55,11 +55,9 @@ module Squeese
55
55
  handler = @@handlers[name]
56
56
  raise(NoSuchJob, name) unless handler
57
57
  handler.call(args)
58
- msg.delete
59
58
  rescue => e
60
- log "Deleting failed job." if msg
61
59
  log exception_message(e)
62
- msg.delete if msg
60
+ log "Deleted failed job." if msg
63
61
  end
64
62
 
65
63
  def log_job(name, args)
@@ -71,7 +69,7 @@ module Squeese
71
69
  end
72
70
 
73
71
  def log(msg)
74
- puts "[#{Time.now}] #{msg}"
72
+ puts "[Squeese][#{Time.now}] #{msg}"
75
73
  end
76
74
 
77
75
  def sqs
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Peter van Hardenberg