commit 823a61711781e40830e4b0499cb836ddd47fc52c Author: Arturo Filastò art@fuffa.org Date: Wed Nov 21 15:42:37 2012 +0100
Make report IDs include the timestamp of the report --- oonib/models.py | 2 ++ oonib/report/api.py | 9 ++------- oonib/runner.py | 1 + 3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/oonib/models.py b/oonib/models.py index e7d2f69..5784673 100644 --- a/oonib/models.py +++ b/oonib/models.py @@ -53,6 +53,8 @@ class Report(OModel): content: what is the content of the report. If the current progress is less than 100 we should append to the YAML data structure that is currently stored in such field. + + XXX this is currently not used. """ __storm_table__ = 'reports'
diff --git a/oonib/report/api.py b/oonib/report/api.py index 1a81e68..708de37 100644 --- a/oonib/report/api.py +++ b/oonib/report/api.py @@ -16,18 +16,13 @@ from twisted.internet import reactor, defer
from cyclone import web
-from ooni.utils import randomStr +from ooni.utils import randomStr, otime from oonib import models, config
backend_version = '0.0.1'
-def updateReport(report_id, content): - print "Report ID: %s" % report_id - print "Content: %s" % content - return {'backend_version': backend_version, 'report_id': report_id} - def generateReportID(): - return randomStr(100) + return otime.timestamp() + '_' + randomStr(20)
class MissingField(Exception): pass diff --git a/oonib/runner.py b/oonib/runner.py index 3e207df..e406ce0 100644 --- a/oonib/runner.py +++ b/oonib/runner.py @@ -54,6 +54,7 @@ if platformType == "win32": WindowsApplicationRunner
OBaseRunner = WindowsApplicationRunner + # XXX Current we don't support windows for the starting of Tor Hidden Service
else: from twisted.scripts._twistd_unix import ServerOptions, \
tor-commits@lists.torproject.org