Skip to content

Commit

Permalink
query only job_status-* indices when purging jobs (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
pymonger authored Sep 1, 2023
1 parent d34be30 commit 7c238d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions purge.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def purge_products(query, component, operation, delete_from_obj_store=True):

if component == "mozart" or component == "figaro":
es = get_mozart_es()
es_index = app.conf["STATUS_ALIAS"]
es_index = "job_status-current"
_source = ["uuid", "payload_id"]
else: # "tosca"
es = get_grq_es()
Expand Down Expand Up @@ -145,7 +145,7 @@ def purge_products(query, component, operation, delete_from_obj_store=True):
logger.info('Revoking %s\n', uuid)
revoke(uuid, state)

# Both associated task and job from ES
# Delete job from ES
logger.info('Removing document from index %s for %s', index, payload_id)
es.delete_by_id(index=index, id=payload_id, ignore=404)
logger.info('Removed %s from index: %s', payload_id, index)
Expand Down

0 comments on commit 7c238d9

Please sign in to comment.