Skip to content

Commit

Permalink
By default, artifacts functionnality is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Feb 23, 2024
1 parent 75466b1 commit 9970b9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions dispatcher/backend/src/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
LOGS_EXPIRATION = int(os.getenv("LOGS_EXPIRATION", "30"))
except Exception:
LOGS_EXPIRATION = 30
ARTIFACTS_UPLOAD_URI = os.getenv(
"ARTIFACTS_UPLOAD_URI", "sftp://uploader@warehouse.farm.openzim.org:1522/artifacts"
)
ARTIFACTS_UPLOAD_URI = os.getenv("ARTIFACTS_UPLOAD_URI", None)
try:
# artifact files expiration, 0 to disable expiration
ARTIFACTS_EXPIRATION = int(os.getenv("ARTIFACTS_EXPIRATION", "30"))
Expand Down
4 changes: 4 additions & 0 deletions workers/app/task/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ def upload_scraper_artifacts(self):
logger.error("No scraper to upload its artifacts…")
return # scraper gone, we can't access artifacts

if not self.task["upload"]["artifacts"]["upload_uri"]:
logger.debug("No artifacts upload URI configured")
return

artifacts_globs = self.task["config"].get("artifacts_globs", None)
if not artifacts_globs:
logger.debug("No artifacts configured for upload")
Expand Down

0 comments on commit 9970b9f

Please sign in to comment.