Skip to content

Commit

Permalink
fixup! Use default interval to stagger new jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Aug 2, 2024
1 parent 6fb08dd commit 784825b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zino/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ async def load_and_schedule_polldevs(polldevs_conf: str):
schedule_devices(new_devices | changed_devices, int(stagger_interval))


def schedule_devices(new_devices: Sequence[str], stagger_interval: int = DEFAULT_INTERVAL_MINUTES):
devices = sorted((state.polldevs[name] for name in new_devices), key=operator.attrgetter("priority"), reverse=True)
def schedule_devices(devices: Sequence[str], stagger_interval: int = DEFAULT_INTERVAL_MINUTES):
devices = sorted((state.polldevs[name] for name in devices), key=operator.attrgetter("priority"), reverse=True)
if not devices:
return

Expand Down

0 comments on commit 784825b

Please sign in to comment.