mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
Fix crash when cancelling pending tasks (#2527)
This commit is contained in:
parent
1b91937004
commit
0c2dc17e8e
2 changed files with 7 additions and 1 deletions
|
|
@ -151,8 +151,13 @@ func initJobManager() *job.Manager {
|
|||
case j := <-c.RemovedJob:
|
||||
if instance.Config.GetNotificationsEnabled() {
|
||||
cleanDesc := strings.TrimRight(j.Description, ".")
|
||||
timeElapsed := j.EndTime.Sub(*j.StartTime)
|
||||
|
||||
if j.StartTime == nil {
|
||||
// Task was never started
|
||||
return
|
||||
}
|
||||
|
||||
timeElapsed := j.EndTime.Sub(*j.StartTime)
|
||||
desktop.SendNotification("Task Finished", "Task \""+cleanDesc+"\" is finished in "+formatDuration(timeElapsed)+".")
|
||||
}
|
||||
case <-ctx.Done():
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
### 🐛 Bug fixes
|
||||
* Fix crash when cancelling pending tasks. ([#2527](https://github.com/stashapp/stash/pull/2527))
|
||||
* Fix markers not refreshing after creating new marker. ([#2502](https://github.com/stashapp/stash/pull/2502))
|
||||
* Fix error when submitting scene draft to stash-box without performers. ([#2515](https://github.com/stashapp/stash/pull/2515))
|
||||
* Fix incorrect video player positioning on touch-enabled devices. ([#2501](https://github.com/stashapp/stash/issues/2501))
|
||||
Loading…
Reference in a new issue