Skip to content

Commit 4c4cbf9

Browse files
committed
fix: do not attempt to updates non-existent eternal jobs on exit
1 parent 4f7903b commit 4c4cbf9

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
0.19.1
1+
1.0.0
2+
- fix: do not attempt to updates non-existent eternal jobs on exit
23
- enh: allow users to specify circle IDs as well as names during upload
34
0.19.0
45
- feat: share dialog for collections and datasets

dcoraid/upload/queue.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import time
44
import threading
55
import traceback
6-
import traceback as tb
76
import warnings
87

98
from ..api import APINotFoundError
@@ -158,7 +157,7 @@ def __init__(self, api, path_persistent_job_list=None, cache_dir=None):
158157
f"file {pp}.",
159158
DCORAidQueueWarning)
160159
except LocalTaskResourcesNotFoundError as e:
161-
self.logger.error(tb.format_exc())
160+
self.logger.error(traceback.format_exc())
162161
resstr = ", ".join([str(pp) for pp in e.missing_resources])
163162
warnings.warn(
164163
"The following resources are missing for dataset "
@@ -179,7 +178,8 @@ def __del__(self):
179178
# Attempt to update the eternal jobs (important for ETags)
180179
for job in self.jobs:
181180
try:
182-
self.jobs_eternal.update_job(job)
181+
if self.jobs_eternal.job_exists(job.dataset_id):
182+
self.jobs_eternal.update_job(job)
183183
except BaseException:
184184
self.logger.error(traceback.format_exc())
185185
self.daemon_upload.shutdown_flag.set()

0 commit comments

Comments
 (0)