jolt 0.9.349__py3-none-any.whl → 0.9.350__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
jolt/graph.py CHANGED
@@ -216,7 +216,7 @@ class TaskProxy(object):
216
216
  for c in self.children:
217
217
  if c.is_resource() or c.is_alias():
218
218
  continue
219
- if not c.is_available_locally():
219
+ if not c.is_available_locally(persistent_only=True):
220
220
  return False
221
221
  return True
222
222
 
@@ -335,16 +335,32 @@ class TaskProxy(object):
335
335
  self._download = False
336
336
 
337
337
  def download(self, force=False, session_only=False, persistent_only=False):
338
+ """
339
+ Downloads all artifacts of this task.
340
+
341
+ If the task is not downloadable, the method returns True. Failure to
342
+ download persistent artifacts is considered a failure, and the method
343
+ returns False. Session artifacts are not required to be downloaded.
344
+
345
+ :param force: Force download even if the artifacts are already available.
346
+ :param session_only: Download only session artifacts.
347
+ :param persistent_only: Download only persistent artifacts.
348
+
349
+ """
338
350
  if not force and not self.is_downloadable():
339
351
  return True
352
+ success = True
340
353
  artifacts = self._artifacts
341
- if session_only:
342
- artifacts = list(filter(lambda a: a.is_session(), artifacts))
343
- if persistent_only:
344
- artifacts = list(filter(lambda a: not a.is_session(), artifacts))
345
- if not artifacts:
346
- return True
347
- return all([self.cache.download(artifact, force=force) for artifact in artifacts])
354
+ artifacts_session = list(filter(lambda a: a.is_session(), artifacts))
355
+ artifacts_persistent = list(filter(lambda a: not a.is_session(), artifacts))
356
+ download_all = not session_only and not persistent_only
357
+ if session_only or download_all:
358
+ for artifact in artifacts_session:
359
+ if not self.cache.download(artifact, force=force):
360
+ self.warning("Failed to download session artifact: {}", artifact.identity)
361
+ if persistent_only or download_all:
362
+ success = all([self.cache.download(artifact, force=force) for artifact in artifacts_persistent])
363
+ return success
348
364
 
349
365
  def upload(self, force=False, locked=False, session_only=False, persistent_only=False, artifacts=None):
350
366
  artifacts = artifacts or self._artifacts
jolt/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.349"
1
+ __version__ = "0.9.350"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jolt
3
- Version: 0.9.349
3
+ Version: 0.9.350
4
4
  Summary: A task executor
5
5
  Home-page: https://github.com/srand/jolt
6
6
  Author: Robert Andersson
@@ -10,7 +10,7 @@ jolt/config.py,sha256=2S8_bdcHaNzwDfkCkHNjFaWn9pykStA4rUa7pz3m5Sg,10367
10
10
  jolt/error.py,sha256=wbYU_ip3zGHlhmjQWjEeLlmLdTpiqIeFM5zJndVQdj4,2399
11
11
  jolt/expires.py,sha256=GDagfgJOlX_z2LLIFhKHBaXI96jo1S3ca2OGWQi1oj4,2330
12
12
  jolt/filesystem.py,sha256=BytxYk6Xq0peuRB9gUZ7EDsvbgirfp4EcjPANNDIstQ,5916
13
- jolt/graph.py,sha256=UcGeT15RNTgx4XpkSZN-kjHCLUOt2jdS-cb53WcnY_M,44832
13
+ jolt/graph.py,sha256=fpnpxi7DwTBk9Mh88iskOkptjpdjU1WFEsFmXnockXo,45698
14
14
  jolt/hooks.py,sha256=jcCaNwlyFrWkXrO6MiO_roDQVohefbablfXnuQ3dmmM,11029
15
15
  jolt/influence.py,sha256=c5Vdizk9kK-8O7cSU9LAHhh8xkvchudstBn7HLIr9hg,16937
16
16
  jolt/inspection.py,sha256=QkOCXAbjJBdw1SMsb6xH_3GHXV5BcdzaGD7HrGmOJss,3931
@@ -23,7 +23,7 @@ jolt/tasks.py,sha256=RYgkG_VB1CxJ_KPbNwPa-EWmqkES7uyvhqyFGtHDtQw,112809
23
23
  jolt/timer.py,sha256=PE-7vmsqZpF73e_cKSsrhd36-A7fJ9_XGYI_oBWJn5w,644
24
24
  jolt/tools.py,sha256=_ijnN47sDFaEDhPMPIkLKcqGOewk2MLzvvyp3kuoask,79867
25
25
  jolt/utils.py,sha256=6TphNzqr2AAQ55bGDD36YoJSi8qQM3FRkrY1iIkhtNA,18771
26
- jolt/version.py,sha256=pjKChzniJdHZBXnyahdsX0lZTfb_HnTr9tFohbsH9kM,24
26
+ jolt/version.py,sha256=lrUnx27u4yml1xuI2hCpgfAIoqn2zRxc_QY5KPnVTA0,24
27
27
  jolt/version_utils.py,sha256=tNCGT6ZmSGFHW1aw2Hx1l19m-RR1UnTN6xJV1I54KRw,3900
28
28
  jolt/xmldom.py,sha256=SbygiDUMYczzWGxXa60ZguWS6Nztg8gDAirdbtjT15I,5982
29
29
  jolt/bin/fstree-darwin-x86_64,sha256=i4Ppbdr7CxsEhJzWpy3GMB5Gn5ikmskh41MyUwQS3-o,29549000
@@ -86,8 +86,8 @@ jolt/templates/cxxexecutable.cmake.template,sha256=f0dg1VOFlamlF8fuHFTki5dsJ2ssS
86
86
  jolt/templates/cxxlibrary.cmake.template,sha256=GMEG2G3QoY3E5fsNer52zOqgM221-abeCkV__mVbZ94,1750
87
87
  jolt/templates/export.sh.template,sha256=PKkflGXFbq70EIsowqcnLvzbnEDnqh_WgC4E_JNT0VE,1937
88
88
  jolt/templates/timeline.html.template,sha256=xdqvFBmhE8XRQaWgcIFBVbd__9HdRq6O-U0o276PyjU,1222
89
- jolt-0.9.349.dist-info/METADATA,sha256=BXsl14MZTYlnLAGf0vPNiLtnMhp6eKUC8_Cl5BjAOBc,5557
90
- jolt-0.9.349.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
91
- jolt-0.9.349.dist-info/entry_points.txt,sha256=VZ-QH38Z9HJc1O57wfzr-soHn6exwc3N0TSrRum4tYg,44
92
- jolt-0.9.349.dist-info/top_level.txt,sha256=HwzVmAwUrvCUUHRi3zUfcpdKTsdNrZmPCvsrsWSFyqE,5
93
- jolt-0.9.349.dist-info/RECORD,,
89
+ jolt-0.9.350.dist-info/METADATA,sha256=qxGNCJtXk0C9KGspuOEPpTeCYtO_hx1wXaGjGcOtcHA,5557
90
+ jolt-0.9.350.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
91
+ jolt-0.9.350.dist-info/entry_points.txt,sha256=VZ-QH38Z9HJc1O57wfzr-soHn6exwc3N0TSrRum4tYg,44
92
+ jolt-0.9.350.dist-info/top_level.txt,sha256=HwzVmAwUrvCUUHRi3zUfcpdKTsdNrZmPCvsrsWSFyqE,5
93
+ jolt-0.9.350.dist-info/RECORD,,
File without changes