-
Type: Bug Report
-
Status: Scheduled
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 5.2.2
-
Component/s: Scheduled Tasks
-
Labels:None
-
Change Log Group:Fixed
-
Change Log Message:Fixed cases, when scheduled task was marked as timeout, while it's still was running.
-
Story Points:1
-
Copy Issue Key:
-
Patch Instructions:
- create "LastRunProcessId" field (int, null, after "LastRunOn") in "scheduled-task" unit and show it grid/editing form as label - 0.5h
- in the "\kScheduledTaskManager::getAll" method: - 0.5h
- don't use "Timeout" column
- select all scheduled tasks with "Status = Active"
- from them if process has "LastRunStatus = Running" and any of above condition are met, then exclude it from the list:
- "LastRunProcessId is empty"
- "LastRunProcessId isn't empty" AND process with specified PID is still running (posix_getpgid(...) !== false)
- in the "\kScheduledTaskManager::run" method record current process id ("getmypid()") in place, where scheduled task status is changed into "Running" - 0.2h
- remove "Timeout" field of "scheduled-task" unit (includes grid/adding/editing templates) - 0.3h
- add "scheduled-task_ProcessStatusColor" tag, that will return "green" when process with PID from is still running AND return "grey" otherwise - 0.2h
- when displaying value of "LastRunProcessId" field use "scheduled-task_ProcessStatusColor" tag to color it dynamically - 0.3h
Quote: 2h*1.4 = 3h