Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@default("_docker_config")
def _load_docker_config(self):
if not os.path.exists(self.docker_config_path):
self.log.warning("No docker config at %s", self.docker_config_path)
return {}
self.log.info("Loading docker config %s", self.docker_config_path)
with open(self.docker_config_path) as f:
return json.load(f)
@default("cmd")
def _default_cmd(self):
""" command arguments to launch jsonrpc-ws-proxy
"""
return [self.nodejs, self.jsonrpc_ws_proxy]
@default('workspaces_url')
def _default_workspaces_url(self):
return ujoin(self.app_url, 'workspaces/')
@tl.default("aws_secret_access_key")
def _get_secret_access_key(self):
return settings["AWS_SECRET_ACCESS_KEY"]
@default('file_extension')
def _file_extension_default(self):
return '.mail'
@default('chart_storage_class')
def chart_storage_class_default(self):
return os.getenv('PG_CHART_STORAGE', 'pixiegateway.chartsManager.SQLLiteChartStorage')
@default('authenticator')
def _authenticator_default(self):
return self.authenticator_class(parent=self, db=self.db)
@default('log_format')
def _log_format_default(self):
"""Override default log format to include time."""
return ('%(color)s['
'%(levelname)1.1s %(asctime)s %(name)s'
@default("authorize_url")
def _authorize_url_default(self):
return os.environ.get("OAUTH2_AUTHORIZE_URL", "")
@default("dask_gateway_jobqueue_launcher")
def _default_launcher_path(self):
return (
shutil.which("dask-gateway-jobqueue-launcher")
or "dask-gateway-jobqueue-launcher"
)