summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/httpserver.py
diff options
context:
space:
mode:
authorOliver Poignant <oliver@poignant.se>2017-01-04 15:18:14 +0100
committerOliver Poignant <oliver@poignant.se>2017-01-04 15:18:14 +0100
commit3b45ec948debb098ed7b7d3a1775b5e42a41be43 (patch)
tree4983a0f05598990212ca94a6c37f0e52cfd1315e /gitautodeploy/httpserver.py
parentc81d62005871d006c4d1feb0c27c15a469f60a35 (diff)
downloadGit-Auto-Deploy-3b45ec948debb098ed7b7d3a1775b5e42a41be43.zip
Git-Auto-Deploy-3b45ec948debb098ed7b7d3a1775b5e42a41be43.tar.gz
Git-Auto-Deploy-3b45ec948debb098ed7b7d3a1775b5e42a41be43.tar.bz2
Support for browser notifications
Diffstat (limited to 'gitautodeploy/httpserver.py')
-rw-r--r--gitautodeploy/httpserver.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/gitautodeploy/httpserver.py b/gitautodeploy/httpserver.py
index 1ed03a8..b5cd801 100644
--- a/gitautodeploy/httpserver.py
+++ b/gitautodeploy/httpserver.py
@@ -146,9 +146,8 @@ class WebbhookRequestProcessor(object):
result.append(repo_result)
action.log_info("Deploy commands were executed")
- action.set_success(True)
action.set_waiting(False)
- action.update()
+ action.set_success(True)
return result
@@ -321,8 +320,8 @@ def WebhookRequestHandlerFactory(config, event_store):
request_headers = dict((k.lower(), v) for k, v in request_headers.items())
action = WebhookAction(self.client_address, request_headers, request_body)
- action.set_waiting(True)
event_store.register_action(action)
+ action.set_waiting(True)
action.log_info('Incoming request from %s:%s' % (self.client_address[0], self.client_address[1]))
@@ -400,9 +399,8 @@ def WebhookRequestHandlerFactory(config, event_store):
self.send_error(400, 'Unprocessable request')
action.log_warning('Unable to process incoming request from %s:%s' % (self.client_address[0], self.client_address[1]))
test_case['expected']['status'] = 400
- action.set_success(False)
action.set_waiting(False)
- action.update()
+ action.set_success(False)
return
except Exception as e:
@@ -412,9 +410,8 @@ def WebhookRequestHandlerFactory(config, event_store):
test_case['expected']['status'] = 500
action.log_warning("Unable to process request")
- action.set_success(False)
action.set_waiting(False)
- action.update()
+ action.set_success(False)
raise e