Skip to content

Commit

Permalink
Support a "direct" priority to run jobs synchronously.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Rarick committed Jun 3, 2008
1 parent 169b62d commit 6a6674f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/async_observer/queue.rb
Expand Up @@ -47,7 +47,7 @@ def sync_run(obj)

def put!(obj, pri=DEFAULT_PRI, delay=DEFAULT_DELAY, ttr=DEFAULT_TTR,
tube=DEFAULT_TUBE)
return sync_run(obj) if !queue
return sync_run(obj) if (:direct.equal?(pri) or !queue)
queue.connect()
queue.use(tube)
info = [queue.yput(obj, pri, delay, ttr), queue.last_server]
Expand Down

0 comments on commit 6a6674f

Please sign in to comment.