Fix queue handling to remove the dependency from repobuild, and have a cancel method

This commit is contained in:
Joseph Schorr 2015-02-23 13:38:01 -05:00
parent 24ab0ae53a
commit 5f605b7cc8
7 changed files with 95 additions and 24 deletions

View file

@ -237,11 +237,11 @@ def start_build(repository, dockerfile_id, tags, build_name, subdir, manual,
'pull_credentials': model.get_pull_credentials(pull_robot_name) if pull_robot_name else None
})
queue_item = dockerfile_build_queue.put([repository.namespace_user.username, repository.name],
json_data,
retries_remaining=3)
queue_id = dockerfile_build_queue.put([repository.namespace_user.username, repository.name],
json_data,
retries_remaining=3)
build_request.queue_item = queue_item
build_request.queue_id = queue_id
build_request.save()
# Add the build to the repo's log.