avoid database transaction to get current time

This commit is contained in:
Noah Levitt 2017-05-17 12:11:26 -07:00
parent a0d17151fe
commit 158923d88b

View File

@ -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