squeese 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/squeese.rb +3 -5
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/lib/squeese.rb
CHANGED
@@ -41,7 +41,7 @@ module Squeese
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def work_one_job
|
44
|
-
msg = queue.
|
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
|
-
|
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
|