Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
catileptic committed Jul 19, 2024
1 parent 297872b commit 292c3c0
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions servicelayer/taskqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ def add_task(self, task_id, stage):
# update dataset timestamps
pipe.set(self.start_key, pack_now(), nx=True)
pipe.set(self.last_update_key, pack_now())
pipe.delete(self.end_key)
pipe.execute()

def remove_task(self, task_id, stage):
Expand Down Expand Up @@ -303,7 +302,7 @@ def mark_done(self, task: Task):

# update dataset timestamps
pipe.set(self.last_update_key, pack_now())

pipe.execute()

if self.is_done():
Expand Down Expand Up @@ -365,29 +364,6 @@ def is_task_tracked(self, task: Task):

return tracked

def flush_status(self, pipe):
"""Flush status data such as timestamps and task counts"""
# remove the dataset from active datasets
pipe.srem(self.key, self.name)

# reset finished task count
pipe.delete(self.finished_key)

# reset timestamps
pipe.delete(self.start_key)
pipe.delete(self.last_update_key)

# delete information about running stages
for stage in self.conn.smembers(self.active_stages_key):
stage_key = self.get_stage_key(stage)
pipe.delete(stage_key)
pipe.delete(make_key(stage_key, "pending"))
pipe.delete(make_key(stage_key, "running"))
pipe.delete(make_key(stage_key, "finished"))

# delete stages key
pipe.delete(self.active_stages_key)

@classmethod
def is_low_prio(cls, conn, collection_id):
"""This Dataset is on the low prio list."""
Expand Down

0 comments on commit 292c3c0

Please sign in to comment.