From 42771d8db684bb5eefcfd7a621886371632fde2f Mon Sep 17 00:00:00 2001 From: Lukas Phaf Date: Wed, 17 Jan 2024 09:35:11 +0100 Subject: [PATCH] Add name to jobs. --- datastore/load-test/schedule_write.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastore/load-test/schedule_write.py b/datastore/load-test/schedule_write.py index d56969c8..88716190 100644 --- a/datastore/load-test/schedule_write.py +++ b/datastore/load-test/schedule_write.py @@ -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: