diff options
author | drebs <drebs@riseup.net> | 2016-05-01 17:22:10 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2016-05-01 21:49:59 -0300 |
commit | 9051ed41e24e98f644b139bff6afc76c184731f0 (patch) | |
tree | f8a41e8a2cb7a50ed1bc01bee13dbc74677b16be | |
parent | bd113c72a3a37c91806dd2cbf0cf8fd47949a2f4 (diff) |
stop server after test
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | graphit | 2 | ||||
-rwxr-xr-x | server_with_soledad_syncer.py | 15 | ||||
-rw-r--r-- | soledad_sync.py | 2 |
4 files changed, 14 insertions, 6 deletions
@@ -24,6 +24,7 @@ measure-ping: trigger-sync: #time curl localhost:8080/start-sync curl localhost:8080/start-sync + curl localhost:8080/stop measure-series: # TODO make sure we have restarted the server, send SIGNUP ? @@ -5,5 +5,5 @@ set title filename set key outside #plot name with linespoints notitle #plot filename using 1:2 with linespoints title columnheader -plot for [col=2:4] filename using 1:col with lines title columnheader +plot for [col=2:4] filename using 1:col with linespoints title columnheader pause -1 diff --git a/server_with_soledad_syncer.py b/server_with_soledad_syncer.py index bc61bb8..dacaecb 100755 --- a/server_with_soledad_syncer.py +++ b/server_with_soledad_syncer.py @@ -1,10 +1,12 @@ # -*- coding: utf-8 -*- #!/usr/bin/env python -import os -from klein import run, route, resource +import os +from klein import run, route, resource import soledad_sync as sync +from twisted.internet import reactor +import datetime @route('/start-sync') @@ -24,8 +26,11 @@ def pid(request): return str(os.getpid()) -if __name__ == "__main__": - #s = sync._get_soledad_instance_from_uuid( - #sync.UUID, 'pass', '/tmp/soledadsync', sync.HOST, '', '') +@route('/stop') +def stop(request): + reactor.callLater(1, reactor.stop) + return '' + +if __name__ == "__main__": run("localhost", 8080) diff --git a/soledad_sync.py b/soledad_sync.py index 44a90bd..154ecfd 100644 --- a/soledad_sync.py +++ b/soledad_sync.py @@ -11,6 +11,8 @@ NUM_DOCS = 50 PAYLOAD = '/tmp/payload' # ------------------------------------------------------ + + DO_THESEUS = os.environ.get('THESEUS', False) |