Removed unecessary dict call in get_workers
This commit is contained in:
+3
-4
@@ -1382,8 +1382,8 @@ class Scheduler(MetaScheduler):
|
|||||||
def get_workers(self, only_ticker=False):
|
def get_workers(self, only_ticker=False):
|
||||||
""" Returns a dict holding worker_name : {**columns}
|
""" Returns a dict holding worker_name : {**columns}
|
||||||
representing all "registered" workers
|
representing all "registered" workers
|
||||||
only_ticker returns only the worker running as a TICKER,
|
only_ticker returns only the workers running as a TICKER,
|
||||||
if there is any
|
if there are any
|
||||||
"""
|
"""
|
||||||
db = self.db
|
db = self.db
|
||||||
if only_ticker:
|
if only_ticker:
|
||||||
@@ -1392,14 +1392,13 @@ class Scheduler(MetaScheduler):
|
|||||||
workers = db(db.scheduler_worker.id > 0).select()
|
workers = db(db.scheduler_worker.id > 0).select()
|
||||||
all_workers = {}
|
all_workers = {}
|
||||||
for row in workers:
|
for row in workers:
|
||||||
all_workers[row.worker_name] = Storage(dict(
|
all_workers[row.worker_name] = Storage(
|
||||||
status=row.status,
|
status=row.status,
|
||||||
first_heartbeat=row.first_heartbeat,
|
first_heartbeat=row.first_heartbeat,
|
||||||
last_heartbeat=row.last_heartbeat,
|
last_heartbeat=row.last_heartbeat,
|
||||||
group_names=row.group_names,
|
group_names=row.group_names,
|
||||||
is_ticker=row.is_ticker,
|
is_ticker=row.is_ticker,
|
||||||
worker_stats=row.worker_stats
|
worker_stats=row.worker_stats
|
||||||
)
|
|
||||||
)
|
)
|
||||||
return all_workers
|
return all_workers
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user