Skip to content

Commit

Permalink
Resource reservations now release properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Bouterse committed Apr 22, 2015
1 parent 5d470f7 commit 1964dbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/pulp/server/async/tasks.py
Expand Up @@ -238,7 +238,7 @@ def apply_async_with_reservation(self, resource_type, resource_id, *args, **kwar
try:
async_result = self.apply_async(*args, **kwargs)
finally:
_queue_release_resource.apply_async((resource_id,), queue=queue,
_queue_release_resource.apply_async((resource_id,), queue=queue[:-3],
exchange=DEDICATED_QUEUE_EXCHANGE)

return async_result
Expand Down
2 changes: 1 addition & 1 deletion server/test/unit/server/async/test_tasks.py
Expand Up @@ -343,7 +343,7 @@ def __init__(self):
queue=tasks.RESOURCE_MANAGER_QUEUE)
apply_async.assert_called_once_with(task, *some_args, **some_kwargs)
_queue_release_resource.apply_async.assert_called_once_with((expected_resource_id,),
queue=WORKER_1_QUEUE,
queue=WORKER_1,
exchange='C.dq')

@mock.patch('pulp.server.async.tasks.Task.request')
Expand Down

0 comments on commit 1964dbd

Please sign in to comment.