mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
avoid database transaction to get current time
This commit is contained in:
parent
a0d17151fe
commit
158923d88b
@ -20,6 +20,7 @@ import rethinkdb as r
|
|||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
import os
|
import os
|
||||||
|
import doublethink
|
||||||
|
|
||||||
class ServiceRegistry(object):
|
class ServiceRegistry(object):
|
||||||
'''
|
'''
|
||||||
@ -221,7 +222,7 @@ class ServiceRegistry(object):
|
|||||||
None
|
None
|
||||||
'''
|
'''
|
||||||
# use the same concept of 'now' for all queries
|
# use the same concept of 'now' for all queries
|
||||||
now = self.rr.now().run()
|
now = doublethink.utcnow()
|
||||||
if candidate is not None:
|
if candidate is not None:
|
||||||
candidate['id'] = role
|
candidate['id'] = role
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user