[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Continue work on OONIB
commit 8417fce6bc80716ea19c6f531c0380c61944be9b
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date: Tue Nov 6 21:58:38 2012 +0100
Continue work on OONIB
---
oonib/oonibackend.py | 6 ++++++
oonib/report/api.py | 3 ++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/bin/oonib b/bin/oonib
old mode 100644
new mode 100755
diff --git a/oonib/oonibackend.py b/oonib/oonibackend.py
index e2e800f..eaa52f9 100644
--- a/oonib/oonibackend.py
+++ b/oonib/oonibackend.py
@@ -9,8 +9,12 @@ import json
import random
import string
+from twisted.application import internet
+
from twisted.internet import protocol, reactor, defer
from twisted.application import internet, service
+from twisted.application.service import Application
+
from twisted.web import resource, server, static
from twisted.web.microdom import escape
from twisted.protocols import basic
@@ -26,6 +30,7 @@ from oonib.testhelpers.httph import HTTPBackend, DebugHTTPServer
from oonib.testhelpers.dns import ProxyDNSServer
from oonib.testhelpers.daphn3 import Daphn3Server
+from cyclone import web
log.start('/tmp/oonib.log')
@@ -70,4 +75,5 @@ if config.main.reporting_port:
internet.TCPServer(int(config.main.reporting_port),
reportingBackend).setServiceParent(serviceCollection)
+reactor.addSystemEventTrigger('after', 'shutdown', db_threadpool.stop)
diff --git a/oonib/report/api.py b/oonib/report/api.py
index ea6085d..996a6e4 100644
--- a/oonib/report/api.py
+++ b/oonib/report/api.py
@@ -14,7 +14,8 @@ from twisted.internet import reactor, defer
from cyclone import web
-from oonib.report.db import models
+from oonib.report import models
+
backend_version = '0.0.1'
def updateReport(report_id, content):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits