def workers_init():
 global DB_SUPPORTS_SUBSECOND_RESOLUTION
 session = get_session()
 query = session.query(models.Worker).filter_by(resource_type='SENTINEL')
 worker = query.first()
 DB_SUPPORTS_SUBSECOND_RESOLUTION = bool(worker.updated_at.microsecond)

def workers_init ( ) : global DB_SUPPORTS_SUBSECOND_RESOLUTION session = get_session ( ) query = session . query ( models . Worker ) . filter_by ( resource_type = 'SENTINEL' ) worker = query . first ( ) DB_SUPPORTS_SUBSECOND_RESOLUTION = bool ( worker . updated_at . microsecond )
check if db supports subsecond resolution and set global flag .