13976: Fix keep reference error
[arvados.git] / sdk / cwl / arvados_cwl / util.py
index 7dafedac28ff811a625dcff40fc9031b36784c0e..98a2a89a1d281e056ee3067752e6094349123115 100644 (file)
@@ -5,8 +5,11 @@
 import datetime
 from arvados.errors import ApiError
 
-def get_intermediate_collection_info(current_container, intermediate_output_ttl):
-        name = "Intermediate collection"
+def get_intermediate_collection_info(workflow_step_name, current_container, intermediate_output_ttl):
+        if workflow_step_name:
+            name = "Intermediate collection for step %s" % (workflow_step_name)
+        else:
+            name = "Intermediate collection"
         trash_time = None
         if intermediate_output_ttl > 0:
             trash_time = datetime.datetime.utcnow() + datetime.timedelta(seconds=intermediate_output_ttl)
@@ -25,4 +28,4 @@ def get_current_container(api, num_retries=0, logger=None):
         # Status code 404 just means we're not running in a container.
         if e.resp.status != 404 and logger:
             logger.info("Getting current container: %s", e)
-    return current_container;
+    return current_container