aboutsummaryrefslogtreecommitdiffstats
path: root/modules/gitmirror/files/on-the-pull
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gitmirror/files/on-the-pull')
-rwxr-xr-xmodules/gitmirror/files/on-the-pull10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/gitmirror/files/on-the-pull b/modules/gitmirror/files/on-the-pull
index 7d3ede29..ec2f979b 100755
--- a/modules/gitmirror/files/on-the-pull
+++ b/modules/gitmirror/files/on-the-pull
@@ -189,6 +189,7 @@ class GitUpdater(Thread):
print(str(e), file=sys.stderr)
GitUpdaterQueue.task_done()
+ sys.stderr.flush()
class TimeoutServer(http.server.HTTPServer):
@@ -236,6 +237,8 @@ class PostHandler(http.server.BaseHTTPRequestHandler):
self.send_response(500)
self.end_headers()
+ sys.stderr.flush()
+
def Demote(pidfile, uid, gid):
def result():
@@ -345,14 +348,17 @@ e.g. curl --header 'Content-Type: x-git/repo' --data 'my/repo/name' http://local
parser.error("You can only specify a user if you're also deamonising (with a pid file).")
print("Server started", file=sys.stderr)
+ sys.stderr.flush()
srvr = TimeoutServer((options.addr, options.port), PostHandler)
- GitUpdater(serverprefix, basefolder, options.repoprefix, options.branch, options.cmd).start()
+ updater = GitUpdater(serverprefix, basefolder, options.repoprefix, options.branch, options.cmd)
+ updater.start()
try:
srvr.serve_forever()
except KeyboardInterrupt:
- GitUpdaterQueue.put(None)
srvr.socket.close()
+ GitUpdaterQueue.put(None)
+ updater.join()
if __name__ == "__main__":