From 620f0d2f3e39262467e8b0e407281a853387b75c Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 5 Aug 2023 23:31:03 +0200 Subject: [PATCH] feat: add magic tag part --- README.md | 2 +- backend/windmill-queue/src/jobs.rs | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 038f07be06..24fa64298a 100644 --- a/README.md +++ b/README.md @@ -367,7 +367,7 @@ it being synced automatically everyday. | QUEUE_LIMIT_WAIT_RESULT | None | The number of max jobs in the queue before rejecting immediately the request in 'run_wait_result' endpoint. Takes precedence on the query arg. If none is specified, there are no limit. | Worker | | DENO_AUTH_TOKENS | None | Custom DENO_AUTH_TOKENS to pass to worker to allow the use of private modules | Worker | | DENO_FLAGS | None | Override the flags passed to deno (default --allow-all) to tighten permissions. Minimum permissions needed are "--allow-read=args.json --allow-write=result.json" | Worker | -| DENO_EXTRA_IMPORT_MAP | None | extra import map to use to run deno scripts (format: `key:value,key:value`) | Worker | +| DENO_EXTRA_IMPORT_MAP | None | extra import map to use to run deno scripts (format: `key=value,key=value`) | Worker | | NPM_CONFIG_REGISTRY | None | Registry to use for NPM dependencies, set if you have a private repository you need to use instead of the default public NPM registry | Worker | | PIP_LOCAL_DEPENDENCIES | None | Specify dependencies that are installed locally and do not need to be solved nor installed again | | | ADDITIONAL_PYTHON_PATHS | None | Specify python paths (separated by a :) to be appended to the PYTHONPATH of the python jobs. To be used with PIP_LOCAL_DEPENDENCIES to use python codebases within Windmill | Worker | diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index c012fedf22..091a383ea4 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -1326,22 +1326,21 @@ pub async fn push<'c, R: rsmq_async::RsmqConnection + Send + 'c>( } let default = || { if job_kind == JobKind::Flow || job_kind == JobKind::FlowPreview { - "flow" + "flow".to_string() } else if job_kind == JobKind::Identity { // identity is a light script, nativets is too - "nativets" + "nativets".to_string() } else if job_kind == JobKind::Dependencies || job_kind == JobKind::FlowDependencies { - "dependency" + "dependency".to_string() } else { - "deno" + "deno".to_string() } }; tag.unwrap_or_else(|| { language .as_ref() - .map(|x| x.as_str()) + .map(|x| x.as_str().replace("$workspace", workspace_id)) .unwrap_or_else(default) - .to_string() }) };