diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-03-28 20:51:00 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-03-28 20:51:00 +0200 |
commit | fa7ed4cd937143726452b2c2f719bafe45f32d76 (patch) | |
tree | 62e53f4104975402146583ba25976cd0fc372d92 /bin/lookup-server | |
parent | 06bd4dc075b1d2901d4503ba1fcf232a238eccc4 (diff) |
lookup-server: enable autocommit and readonly mode
Diffstat (limited to 'bin/lookup-server')
-rwxr-xr-x | bin/lookup-server | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/lookup-server b/bin/lookup-server index 13bff59..615f363 100755 --- a/bin/lookup-server +++ b/bin/lookup-server @@ -24,6 +24,9 @@ conn = psycopg2.connect( host=os.getenv("GEOLOOKUP_DBHOST", "localhost"), ) +conn.autocommit = True +conn.set_session(readonly=True) + def set_coarse_location(train): now = datetime.now(pytz.utc) |