UI and http triggers

This commit is contained in:
HugoCasa
2025-11-28 16:49:46 +01:00
parent b95a8586b9
commit b7d4c63456
27 changed files with 974 additions and 551 deletions
+5 -7
View File
@@ -5279,10 +5279,10 @@ pub async fn push<'c, 'd>(
root_job
};
let (job_kind, suspend, suspend_until) = if suspended_mode.unwrap_or(false) {
(JobKind::Unassigned, Some(1), Some(Utc::now() + chrono::Duration::days(30)))
let (job_kind, scheduled_for_o) = if suspended_mode.unwrap_or(false) {
(JobKind::Unassigned, Some(Utc::now() + chrono::Duration::days(30)))
} else {
(job_kind, None, None)
(job_kind, scheduled_for_o)
};
sqlx::query!(
@@ -5305,8 +5305,8 @@ pub async fn push<'c, 'd>(
ON CONFLICT (job_id) DO UPDATE SET email = EXCLUDED.email, username = EXCLUDED.username, is_admin = EXCLUDED.is_admin, is_operator = EXCLUDED.is_operator, folders = EXCLUDED.folders, groups = EXCLUDED.groups, workspace_id = EXCLUDED.workspace_id, end_user_email = EXCLUDED.end_user_email
)
INSERT INTO v2_job_queue
(workspace_id, id, running, scheduled_for, started_at, tag, priority, suspend, suspend_until)
VALUES ($2, $1, $28, COALESCE($29, now()), CASE WHEN $27 OR $40 THEN now() END, $30, $31, $42, $43)",
(workspace_id, id, running, scheduled_for, started_at, tag, priority)
VALUES ($2, $1, $28, COALESCE($29, now()), CASE WHEN $27 OR $40 THEN now() END, $30, $31)",
job_id,
workspace_id,
raw_code,
@@ -5352,8 +5352,6 @@ pub async fn push<'c, 'd>(
trigger_kind as Option<JobTriggerKind>,
running,
end_user_email,
suspend,
suspend_until,
)
.execute(&mut *tx)
.warn_after_seconds(1)