Skip to content

Commit

Permalink
Finally upgraded RabbitMQ's Erlang client
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurii Rashkovskii committed Jan 1, 2010
1 parent 67badd9 commit 6137dab
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 43 deletions.
18 changes: 7 additions & 11 deletions src/amqpfs_provider.erl
Expand Up @@ -195,17 +195,13 @@ setup_listener(Name, #amqpfs_provider_state{channel = Channel, user_id = UserId}
queue = Queue, exchange = <<"amqpfs.provider">>,
routing_key = UserId,
nowait = false, arguments = []}),
#'basic.consume_ok'{consumer_tag = ConsumerTag} = amqp_channel:subscribe(Channel, #'basic.consume'{
queue = Queue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}, self()),
receive
#'basic.consume_ok'{consumer_tag = ConsumerTag} -> ok
end.

#'basic.consume_ok'{consumer_tag = _ConsumerTag} = amqp_channel:call(Channel, #'basic.consume'{
queue = Queue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}).

%%%

Expand Down
36 changes: 15 additions & 21 deletions src/amqpfs_server.erl
Expand Up @@ -88,27 +88,21 @@ init ([]) ->
queue = ResponseQueue, exchange = <<"amqpfs.response">>,
routing_key = amqpfs_util:response_routing_key(),
nowait = false, arguments = []}),
#'basic.consume_ok'{consumer_tag = ConsumerTag} = amqp_channel:subscribe(AmqpChannel, #'basic.consume'{
queue = Queue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}, self()),
receive
#'basic.consume_ok'{consumer_tag = ConsumerTag} -> ok
end,
#'basic.consume_ok'{consumer_tag = ResponseConsumerTag} = amqp_channel:subscribe(AmqpChannel, #'basic.consume'{
queue = ResponseQueue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}, self()),
receive
#'basic.consume_ok'{consumer_tag = ResponseConsumerTag} -> ok
end,

#'basic.consume_ok'{consumer_tag = ConsumerTag} = amqp_channel:call(AmqpChannel, #'basic.consume'{
queue = Queue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}),

#'basic.consume_ok'{consumer_tag = ResponseConsumerTag} = amqp_channel:call(AmqpChannel, #'basic.consume'{
queue = ResponseQueue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}),
State = #amqpfs{ inodes = ets:new(inodes, [public, ordered_set]),
names = ets:new(names, [public, set]),
announcements = ets:new(announcements, [public, bag]),
Expand Down
17 changes: 7 additions & 10 deletions src/root_amqpfs_provider.erl
Expand Up @@ -23,16 +23,13 @@ init(#amqpfs_provider_state{ channel = Channel }=State) ->
queue = Queue, exchange = <<"amqpfs.announce">>,
routing_key = <<"">>,
nowait = false, arguments = []}),
#'basic.consume_ok'{consumer_tag = ConsumerTag} = amqp_channel:subscribe(Channel, #'basic.consume'{
queue = Queue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}, self()),
receive
#'basic.consume_ok'{consumer_tag = ConsumerTag} -> ok
end,
#'basic.consume_ok'{consumer_tag = _ConsumerTag} = amqp_channel:call(Channel, #'basic.consume'{
queue = Queue,
consumer_tag = <<"">>,
no_local = false,
no_ack = true,
exclusive = false,
nowait = false}),
State1 = State#amqpfs_provider_state { extra = #root_amqpfs_provider_extra{ items = ets:new(root_fs_items, [public, set]) } },
amqpfs_provider:announce(directory, "/", State1),
State1.
Expand Down
2 changes: 1 addition & 1 deletion vendor/rabbitmq-erlang-client
Submodule rabbitmq-erlang-client updated from 696093 to 43458c

0 comments on commit 6137dab

Please sign in to comment.