mirror of
https://github.com/clearml/clearml-server
synced 2025-05-31 18:38:56 +00:00
Fix loading expired worker entries from Redis
This commit is contained in:
parent
36b9ab0453
commit
f7e833bf6f
@ -365,10 +365,15 @@ class WorkerBLL:
|
||||
self, company: str, user: str = "*", worker_id: str = "*"
|
||||
) -> Sequence[WorkerEntry]:
|
||||
"""Get worker entries matching the company and user, worker patterns"""
|
||||
entries = []
|
||||
match = self._get_worker_key(company, user, worker_id)
|
||||
with TimingContext("redis", "workers_get_all"):
|
||||
res = self.redis.scan_iter(match)
|
||||
return [WorkerEntry.from_json(self.redis.get(r)) for r in res]
|
||||
for r in self.redis.scan_iter(match):
|
||||
data = self.redis.get(r)
|
||||
if data:
|
||||
entries.append(WorkerEntry.from_json(data))
|
||||
|
||||
return entries
|
||||
|
||||
@staticmethod
|
||||
def _get_es_index_suffix():
|
||||
|
Loading…
Reference in New Issue
Block a user