Exemplo n.º 1
0
 def update_worker_execution_time(cls, actor_id, worker_id):
     """Pass db_id as `actor_id` parameter."""
     logger.debug("top of update_worker_execution_time().")
     now = time.time()
     workers_store.update_subfield(actor_id, worker_id, 'last_execution', now)
     workers_store.update_subfield(actor_id, worker_id, 'last_update', now)
     logger.info("worker execution time updated. worker_id: {}".format(worker_id))
Exemplo n.º 2
0
 def update_worker_health_time(cls, actor_id, worker_id):
     """Pass db_id as `actor_id` parameter."""
     logger.debug("top of update_worker_health_time().")
     now = get_current_utc_time()
     workers_store.update_subfield(actor_id, worker_id,
                                   'last_health_check_time', now)
     logger.info(
         "worker last_health_check_time updated. worker_id: {}".format(
             worker_id))
Exemplo n.º 3
0
 def update_worker_status(cls, actor_id, worker_id, status):
     """Pass db_id as `actor_id` parameter."""
     logger.debug("top of update_worker_status().")
     try:
         workers_store.update_subfield(actor_id, worker_id, 'status',
                                       status)
     except Exception as e:
         logger.error(
             "Got exception trying to update worker subfield; e: {}".format(
                 e))
     logger.info("worker status updated to: {}. worker_id: {}".format(
         status, worker_id))
Exemplo n.º 4
0
 def update_worker_execution_time(cls, actor_id, worker_id):
     """Pass db_id as `actor_id` parameter."""
     logger.debug("top of update_worker_execution_time().")
     now = get_current_utc_time()
     try:
         workers_store.update_subfield(actor_id, worker_id,
                                       'last_execution_time', now)
     except KeyError as e:
         logger.error(
             "Got KeyError; actor_id: {}; worker_id: {}; exception: {}".
             format(actor_id, worker_id, e))
         raise e
     logger.info(
         "worker execution time updated. worker_id: {}".format(worker_id))
Exemplo n.º 5
0
 def update_worker_status(cls, actor_id, worker_id, status):
     """Pass db_id as `actor_id` parameter."""
     logger.debug("top of update_worker_status().")
     workers_store.update_subfield(actor_id, worker_id, 'status', status)
     logger.info("worker status updated to: {}. worker_id: {}".format(status, worker_id))
Exemplo n.º 6
0
Arquivo: models.py Projeto: TACC/abaco
 def update_worker_status(cls, actor_id, ch_name, status):
     """Pass db_id as `actor_id` parameter."""
     workers_store.update_subfield(actor_id, ch_name, 'status', status)
Exemplo n.º 7
0
Arquivo: models.py Projeto: TACC/abaco
 def update_worker_execution_time(cls, actor_id, ch_name):
     """Pass db_id as `actor_id` parameter."""
     now = time.time()
     workers_store.update_subfield(actor_id, ch_name, 'last_execution', now)
     workers_store.update_subfield(actor_id, ch_name, 'last_update', now)
Exemplo n.º 8
0
 def update_worker_status(cls, actor_id, worker_id, status):
     """Pass db_id as `actor_id` parameter."""
     workers_store.update_subfield(actor_id, worker_id, 'status', status)
Exemplo n.º 9
0
 def update_worker_execution_time(cls, actor_id, worker_id):
     """Pass db_id as `actor_id` parameter."""
     now = time.time()
     workers_store.update_subfield(actor_id, worker_id, 'last_execution',
                                   now)
     workers_store.update_subfield(actor_id, worker_id, 'last_update', now)