Skip to content

Instantly share code, notes, and snippets.

@shuhrat
Created October 30, 2017 13:00
Show Gist options
  • Save shuhrat/7c200cf654ff3beb35f0eddc029479c5 to your computer and use it in GitHub Desktop.
Save shuhrat/7c200cf654ff3beb35f0eddc029479c5 to your computer and use it in GitHub Desktop.
with self.profiler.actions.register_artifacts('Registering Sandbox resources'):
if not self.Parameters.reuse_artifacts_cache:
return self.create_artifact_resources(), ArtifactsCacheStatus.CACHE_IGNORED
cached_resources = self.get_cached_artifact_resources()
if cached_resources:
return cached_resources, ArtifactsCacheStatus.CACHE_REUSED
return self.create_artifact_resources(), ArtifactsCacheStatus.CACHE_NOT_FOUND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment