mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Fix crash when cancelling pending tasks (#2527)
This commit is contained in:
@@ -151,8 +151,13 @@ func initJobManager() *job.Manager {
|
|||||||
case j := <-c.RemovedJob:
|
case j := <-c.RemovedJob:
|
||||||
if instance.Config.GetNotificationsEnabled() {
|
if instance.Config.GetNotificationsEnabled() {
|
||||||
cleanDesc := strings.TrimRight(j.Description, ".")
|
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)+".")
|
desktop.SendNotification("Task Finished", "Task \""+cleanDesc+"\" is finished in "+formatDuration(timeElapsed)+".")
|
||||||
}
|
}
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
### 🐛 Bug fixes
|
### 🐛 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 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 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))
|
* Fix incorrect video player positioning on touch-enabled devices. ([#2501](https://github.com/stashapp/stash/issues/2501))
|
||||||
Reference in New Issue
Block a user