Skip to content

Commit

Permalink
feat(dask): add DASK_SCHEDULER_URI env variable (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alputer committed Aug 30, 2024
1 parent 13738ad commit 99c3396
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions reana_job_controller/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
CACHE_ENABLED = False
"""Determines if jobs caching is enabled."""

DASK_SCHEDULER_URI = os.getenv("DASK_SCHEDULER_URI", "tcp://127.0.0.1:8080")
"""Address of the Dask Scheduler."""

SHARED_VOLUME_PATH_ROOT = os.getenv("SHARED_VOLUME_PATH_ROOT", "/var/reana")
"""Root path of the shared volume ."""

Expand Down
3 changes: 2 additions & 1 deletion reana_job_controller/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from reana_db.database import Session
from reana_db.models import Job as JobTable, JobCache, JobStatus, Workflow

from reana_job_controller.config import CACHE_ENABLED
from reana_job_controller.config import CACHE_ENABLED, DASK_SCHEDULER_URI


class JobManager:
Expand Down Expand Up @@ -149,4 +149,5 @@ def _extend_env_vars(self, env_vars):
prefix = "REANA"
env_vars[prefix + "_WORKSPACE"] = self.workflow_workspace
env_vars[prefix + "_WORKFLOW_UUID"] = str(self.workflow_uuid)
env_vars["DASK_SCHEDULER_URI"] = DASK_SCHEDULER_URI
return env_vars

0 comments on commit 99c3396

Please sign in to comment.