From 9051ed41e24e98f644b139bff6afc76c184731f0 Mon Sep 17 00:00:00 2001 From: drebs Date: Sun, 1 May 2016 17:22:10 -0300 Subject: stop server after test --- Makefile | 1 + graphit | 2 +- server_with_soledad_syncer.py | 15 ++++++++++----- soledad_sync.py | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 52d7451..c710c68 100644 --- a/Makefile +++ b/Makefile @@ -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 ? diff --git a/graphit b/graphit index 250b99e..92ea0e7 100755 --- a/graphit +++ b/graphit @@ -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) -- cgit v1.2.3