From 891ffb6e1ce8edde652dad7281f4258f4eeb6343 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Thu, 25 Jul 2024 13:18:00 -0600 Subject: [PATCH] Prevent any task from starting when another backup process is still running. --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/dotnet/Datack.Agent.Service/Datack.Agent.csproj | 2 +- src/dotnet/Datack.Web.Service/Services/JobRunner.cs | 2 +- src/dotnet/Datack.Web.Web/Datack.Web.Web.csproj | 2 +- src/react/src/pages/settings/SettingsOverview.tsx | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c338c54..ca58fb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.20] - 2024-07-24 +### Changed +- Prevent any task from starting for an item when another job has any uncompleted tasks for it. + ## [1.0.19] - 2024-07-24 ### Added - Add task to restore a SQL Server database. diff --git a/package.json b/package.json index 22dda5e..6393b6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datack", - "version": "1.0.19", + "version": "1.0.20", "description": "Simple database backup tool.", "main": "index.js", "dependencies": { diff --git a/src/dotnet/Datack.Agent.Service/Datack.Agent.csproj b/src/dotnet/Datack.Agent.Service/Datack.Agent.csproj index c826d87..5c6a2e9 100644 --- a/src/dotnet/Datack.Agent.Service/Datack.Agent.csproj +++ b/src/dotnet/Datack.Agent.Service/Datack.Agent.csproj @@ -6,7 +6,7 @@ enable latest Exe - 1.0.19 + 1.0.20 diff --git a/src/dotnet/Datack.Web.Service/Services/JobRunner.cs b/src/dotnet/Datack.Web.Service/Services/JobRunner.cs index e7c6f9c..df53f6d 100644 --- a/src/dotnet/Datack.Web.Service/Services/JobRunner.cs +++ b/src/dotnet/Datack.Web.Service/Services/JobRunner.cs @@ -190,7 +190,7 @@ public async Task SetupJobRun(Job job, IList? overrideItemList, Ca // If so, skip it in the run. foreach (var jobRunTask in jobRunTasks) { - if (runningTasks.Count(m => m.JobTaskId == jobRunTask.JobTaskId && m.ItemName == jobRunTask.ItemName && m.Completed == null) > 0) + if (runningTasks.Count(m => m.ItemName == jobRunTask.ItemName && m.Completed == null) > 0) { _logger.LogDebug("Skipping task {type} for job {name} as it's already running", jobTask.Type, job.Name); } diff --git a/src/dotnet/Datack.Web.Web/Datack.Web.Web.csproj b/src/dotnet/Datack.Web.Web/Datack.Web.Web.csproj index aeb3a67..5f1b7bf 100644 --- a/src/dotnet/Datack.Web.Web/Datack.Web.Web.csproj +++ b/src/dotnet/Datack.Web.Web/Datack.Web.Web.csproj @@ -5,7 +5,7 @@ enable enable latest - 1.0.19 + 1.0.20 diff --git a/src/react/src/pages/settings/SettingsOverview.tsx b/src/react/src/pages/settings/SettingsOverview.tsx index e5d01b8..3862539 100644 --- a/src/react/src/pages/settings/SettingsOverview.tsx +++ b/src/react/src/pages/settings/SettingsOverview.tsx @@ -90,7 +90,7 @@ const SettingsOverview: FC = () => { Server Logging - Server version 1.0.19 + Server version 1.0.20