コード例 #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))
コード例 #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))
コード例 #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))
コード例 #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))
コード例 #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))
コード例 #6
0
ファイル: models.py プロジェクト: 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)
コード例 #7
0
ファイル: models.py プロジェクト: 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)
コード例 #8
0
ファイル: models.py プロジェクト: mwvaughn/abaco
 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)
コード例 #9
0
ファイル: models.py プロジェクト: mwvaughn/abaco
 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)