You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2015/07/13 15:38:33 UTC
svn commit: r1690668 - /comdev/reporter.apache.org/trunk/scandist.py
Author: sebb
Date: Mon Jul 13 13:38:33 2015
New Revision: 1690668
URL: http://svn.apache.org/r1690668
Log:
Ensure we exit on control+C
Modified:
comdev/reporter.apache.org/trunk/scandist.py
Modified: comdev/reporter.apache.org/trunk/scandist.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scandist.py?rev=1690668&r1=1690667&r2=1690668&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scandist.py (original)
+++ comdev/reporter.apache.org/trunk/scandist.py Mon Jul 13 13:38:33 2015
@@ -179,6 +179,10 @@ def read_chunk(req):
# PubSub class: handles connecting to a pubsub service and checking commits
class PubSubClient(Thread):
+ def __init__(self):
+ Thread.__init__(self)
+ self.setDaemon(True) # ensure script exits when main process is killed with ^C
+
def run(self):
global targets
while True:
@@ -239,6 +243,7 @@ def main():
# Start the svn thread
svn_thread = PubSubClient()
+ # 0d268c88-bc11-4956-87df-91683dc98e59 = https://dist.apache.org/repos/dist
svn_thread.url = "http://hades.apache.org:2069/commits/*"
svn_thread.start()