Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
import git, os, shutil, json
import git, os, shutil, json, threading

from flask import Flask, Response

Expand Down Expand Up @@ -175,16 +175,20 @@ def listenBuild(secret):
if not secret == config["secret"]:
return "Access denied"

build()

response = Response('built started')

response.call_on_close(build)
thread = threading.Thread(target=build)
thread.start()

return response

def build():

print("Start build")


repo, origin = initRepo(config["workPath"], config["remoteUrl"])

output = ""
Expand Down Expand Up @@ -227,7 +231,6 @@ def build():
exit(1)

listenBuild(config["secret"])
build()

app.run(debug=config["debug"]=="True",
port=defaultPort,
Expand Down