Skip to content

Commit

Permalink
Added some debug statements.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgastako committed Mar 7, 2009
1 parent 5c92d0d commit 97bb11d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mqueue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ manage_queue(QueueName, Q) ->


enqueue(QueueName, Data) ->
erqutils:debug("mqueue:enqueue(~p, ~p)", [QueueName, Data]),
QueuePid = get_queue_pid(QueueName),
erqutils:debug("mqueue:enqueue :: got QueuePid: ~p", [QueuePid]),
QueuePid ! {add, Data, self()},
erqutils:debug("mqueue:enqueue :: waiting for response...", []),
receive
X -> X
end.
Expand Down
6 changes: 5 additions & 1 deletion pqueue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@


enqueue(QueueName, Data) ->
erqutils:debug("pqueue:enqueue(~p, ~p)", [QueueName, Data]),
mqueue:enqueue(mangle(QueueName), Data),
journal:enqueue(mangle(QueueName), Data).
erqutils:debug("pqueue:enqueue :: mqueue:enqueue complete.", []),
journal:enqueue(mangle(QueueName), Data),
erqutils:debug("pqueue:enqueue :: journal:enqueue complete.", []).


dequeue(QueueName) ->
erqutils:debug("pqueue:dequeue(~p)", [QueueName]),
Result = mqueue:dequeue(mangle(QueueName)),
journal:remove(),
Result.
Expand Down

0 comments on commit 97bb11d

Please sign in to comment.