blob: 71aae56843f72bd1b382b69f29c1cdaa9849f5f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/usr/bin/env python
import os
from klein import run, route
import soledad_sync as sync
s = None
@route('/start-sync')
def home(request):
print "GOT REQUEST FOR STARTING SYNC..."
d = sync.upload_soledad_stuff(s)
return d
@route('/ping')
def ping(request):
return 'easy!'
@route('/pid')
def pid(request):
return str(os.getpid())
if __name__ == "__main__":
global s
s = sync._get_soledad_instance_from_uuid(
sync.UUID, 'pass', '/tmp/soledadsync', sync.HOST, '', '')
run("localhost", 8080)
|