From: Eugene Crosser Date: Thu, 26 May 2022 12:50:05 +0000 (+0200) Subject: cleanup and document config file a bit X-Git-Tag: 0.94~3 X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=commitdiff_plain;h=3b94b72763b7db9e9665d60c3dd26812bd134a8d cleanup and document config file a bit --- diff --git a/debian/gps303.conf b/debian/gps303.conf index 3b2ca38..f19b4af 100644 --- a/debian/gps303.conf +++ b/debian/gps303.conf @@ -1,4 +1,6 @@ [collector] +# configure your gps terminal with this SMS: +# "server##4303#" port = 4303 publishurl = ipc:///var/lib/gps303/collected listenurl = ipc:///var/lib/gps303/responses @@ -11,10 +13,14 @@ htmlfile = /var/lib/gps303/index.html dbfn = /var/lib/gps303/gps303.sqlite [lookaside] -publishurl = ipc:///var/lib/gps303/locevt +# "opencellid" is the only implemented backend for the time being +backend = opencellid [opencellid] dbfn = /var/lib/opencellid/opencellid.sqlite +# for testing: run `python -m http.server --directory ` and use this: +# downloadurl = http://localhost:8000/.csv.gz +# then the next two statements will be ignored downloadtoken = /var/lib/opencellid/opencellid.token downloadmcc = 262 diff --git a/gps303/lookaside.py b/gps303/lookaside.py index 136ade9..b42ce06 100644 --- a/gps303/lookaside.py +++ b/gps303/lookaside.py @@ -15,6 +15,10 @@ log = getLogger("gps303/lookaside") def runserver(conf): + if conf.get("lookaside", "backend") != "opencellid": + raise NotImplementedError( + "Lookaside only implements opencellid backend" + ) zctx = zmq.Context() zsub = zctx.socket(zmq.SUB) zsub.connect(conf.get("collector", "publishurl"))