|
@@ -204,14 +204,18 @@ class ProgressTracker(threading.Thread):
|
|
|
local_progress = self.local_progress
|
|
|
last_report_time = get_dht_time()
|
|
|
|
|
|
- store_task = asyncio.create_task(asyncio.wait_for(
|
|
|
- self.dht.store(
|
|
|
- key=self.training_progress_key,
|
|
|
- subkey=self._local_public_key,
|
|
|
- value=local_progress.dict(),
|
|
|
- expiration_time=last_report_time + self.metadata_expiration,
|
|
|
- return_future=True,
|
|
|
- ), timeout=self.metadata_expiration))
|
|
|
+ store_task = asyncio.create_task(
|
|
|
+ asyncio.wait_for(
|
|
|
+ self.dht.store(
|
|
|
+ key=self.training_progress_key,
|
|
|
+ subkey=self._local_public_key,
|
|
|
+ value=local_progress.dict(),
|
|
|
+ expiration_time=last_report_time + self.metadata_expiration,
|
|
|
+ return_future=True,
|
|
|
+ ),
|
|
|
+ timeout=self.metadata_expiration,
|
|
|
+ )
|
|
|
+ )
|
|
|
finally:
|
|
|
logger.log(self.status_loglevel, f"No longer reporting progress for {self.prefix}.")
|
|
|
if store_task is not None and not store_task.done():
|
|
@@ -335,5 +339,5 @@ class ProgressTracker(threading.Thread):
|
|
|
subkey=self._local_public_key,
|
|
|
value=None,
|
|
|
expiration_time=get_dht_time() + self.metadata_expiration,
|
|
|
- return_future=True
|
|
|
+ return_future=True,
|
|
|
)
|