Skip to content

Commit 33b8bc8

Browse files
author
Ryan R. Smith
committed
log when we receive notifications
1 parent 6f63348 commit 33b8bc8

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

changelog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 1.0.0rc1
2+
- Removed json gem and relying on ruby 1.9.2's stdlib
3+
- Added better documentation
4+
15
Version 0.3.6pre
26
- Added listen/notify support configured by $QC_LISTENING_WORKER otherwise uses Kernel.sleep()
37

lib/queue_classic/database.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def drain_notify
5050

5151
def wait_for_notify(t)
5252
log("waiting for notify timeout=#{t}")
53-
connection.wait_for_notify(t)
53+
connection.wait_for_notify(t) {|event, pid, msg| log("received notification #{event}")}
5454
log("done waiting for notify")
5555
end
5656

lib/queue_classic/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def wait(t)
113113
if can_listen?
114114
log("worker waiting on LISTEN")
115115
@queue.database.listen
116-
@queue.database.wait_for_notify(t) { log("message received") }
116+
@queue.database.wait_for_notify(t)
117117
@queue.database.unlisten
118118
@queue.database.drain_notify
119119
log("worker finished LISTEN")

0 commit comments

Comments
 (0)