if webhook fails 500 is returned
This commit is contained in:
parent
7b3a883747
commit
04636edf68
11
main.py
11
main.py
|
@ -43,7 +43,10 @@ def query_get(q='*', s:int=0, i=None):
|
||||||
@app.push('/api/webhook')
|
@app.push('/api/webhook')
|
||||||
def on_git_push():
|
def on_git_push():
|
||||||
log.info('Executing webhook for Gitea')
|
log.info('Executing webhook for Gitea')
|
||||||
repo = Repo()
|
try:
|
||||||
repo.remotes.origin.pull()
|
repo = Repo()
|
||||||
os.system('sudo systemctl restart paper-demo')
|
repo.remotes.origin.pull()
|
||||||
return 200
|
os.system('sudo systemctl restart paper-demo')
|
||||||
|
return 200
|
||||||
|
except:
|
||||||
|
return 500
|
Loading…
Reference in New Issue