From 6bc0e373fc6088636f09d217e8800a32337291ea Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 6 Sep 2023 18:21:00 +0200 Subject: [PATCH] fix: reduce aggregate period to list users in workspace --- .github/workflows/docker-image.yml | 1 + backend/windmill-api/src/users.rs | 2 +- backend/windmill-worker/src/js_eval.rs | 4 ++-- .../src/lib/components/settings/WorkspaceUserSettings.svelte | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 0141fd9c03..59df5f5da8 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -96,6 +96,7 @@ jobs: uses: depot/build-push-action@v1 with: context: . + platforms: linux/amd64,linux/arm64 push: true build-args: | features=enterprise diff --git a/backend/windmill-api/src/users.rs b/backend/windmill-api/src/users.rs index 3dd0576ccc..5a7fa3149a 100644 --- a/backend/windmill-api/src/users.rs +++ b/backend/windmill-api/src/users.rs @@ -717,7 +717,7 @@ async fn list_users( WHERE workspace_id = $1 AND job_kind NOT IN ('flow', 'flowpreview') AND email = usr.email - AND now() - '5 week'::interval < created_at + AND now() - '1 week'::interval < created_at ) usage WHERE workspace_id = $1 ", diff --git a/backend/windmill-worker/src/js_eval.rs b/backend/windmill-worker/src/js_eval.rs index 9360287e7f..e82f7e0234 100644 --- a/backend/windmill-worker/src/js_eval.rs +++ b/backend/windmill-worker/src/js_eval.rs @@ -441,7 +441,7 @@ pub async fn eval_fetch_timeout( let (sender, mut receiver) = oneshot::channel::(); let ts_expr2 = ts_expr.clone(); timeout( - std::time::Duration::from_millis(100000), + std::time::Duration::from_secs(100), tokio::task::spawn_blocking(move || { let ops = vec![op_get_static_args::DECL, op_log::DECL]; let ext = Extension { @@ -536,7 +536,7 @@ pub async fn eval_fetch_timeout( isolate.terminate_execution(); }; Error::ExecutionErr(format!( - "The expression of evaluation `{ts_expr2}` took too long to execute (>10000ms)" + "The expression of evaluation `{ts_expr2}` took too long to execute (>100s)" )) })?? } diff --git a/frontend/src/lib/components/settings/WorkspaceUserSettings.svelte b/frontend/src/lib/components/settings/WorkspaceUserSettings.svelte index e07bed5be5..054efafb9c 100644 --- a/frontend/src/lib/components/settings/WorkspaceUserSettings.svelte +++ b/frontend/src/lib/components/settings/WorkspaceUserSettings.svelte @@ -117,7 +117,7 @@ Username - Executions (5w) + Executions (1w) An execution is calculated as 1 for any runs of scripts + 1 for each seconds above the first one