Skip to content

Commit

Permalink
Add name to jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-phaf committed Jan 17, 2024
1 parent 25466eb commit ed55617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datastore/load-test/schedule_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def write_data(station):
print(station_id, cron, period)
# TODO: Spread less well over time, for example, all use same second, but add jitter < 60
trigger = CronTrigger(minute=cron, second=random.randint(0, 59), jitter=1)
scheduler.add_job(write_data, args=(station,), id=station_id, trigger=trigger)
scheduler.add_job(write_data, args=(station,), id=station_id, name=station_id, trigger=trigger)
print("Press Ctrl+{0} to exit".format("Break" if os.name == "nt" else "C"))

try:
Expand Down

0 comments on commit ed55617

Please sign in to comment.