Skip to content

Commit

Permalink
Fixing the typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanElsaban committed Apr 30, 2024
1 parent ea53c81 commit d1a9431
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tron/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ def restore_state(self, action_runner):
to the configured Jobs.
"""
log.info("Restoring from DynamoDB")
with timer(name="restore"):
with timer("restore"):
# restores the state of the jobs and their runs from DynamoDB
states = self.state_watcher.restore(self.jobs.get_names())
log.info(
f"Tron will start restoring state for the jobs and will start scheduling them! Time elapsed since Tron started {time.time() - self.boot_time}"
)
# loads the runs' state and schedule the next run for each job
with timer(name="self.jobs.restore_state"):
with timer("self.jobs.restore_state"):
self.jobs.restore_state(states.get("job_state", {}), action_runner)
log.info(
f"Tron completed restoring state for the jobs. Time elapsed since Tron started {time.time() - self.boot_time}"
Expand Down
2 changes: 1 addition & 1 deletion tron/serialize/runstate/dynamodb_state_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def restore(self, keys) -> dict:
vals = self._merge_items(first_items, remaining_items)
return vals

def chunk_keys(self, keys: Sequence[T]) -> List[List[T]]:
def chunk_keys(self, keys: Sequence[T]) -> List[Sequence[T]]:
"""Generates a list of chunks of keys to be used to read from DynamoDB"""
# have a for loop here for all the key chunks we want to go over
cand_keys_chunks = []
Expand Down

0 comments on commit d1a9431

Please sign in to comment.