Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1754

Timeout scheduled tasks based on CRON process status

    XMLWordPrintable

    Details

    • 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:

      Patches must be submitted through Phabricator.

      Description

      1. create "LastRunProcessId" field (int, null, after "LastRunOn") in "scheduled-task" unit and show it grid/editing form as label - 0.5h
      2. in the "\kScheduledTaskManager::getAll" method: - 0.5h
        1. don't use "Timeout" column
        2. select all scheduled tasks with "Status = Active"
        3. 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)
      3. in the "\kScheduledTaskManager::run" method record current process id ("getmypid()") in place, where scheduled task status is changed into "Running" - 0.2h
      4. remove "Timeout" field of "scheduled-task" unit (includes grid/adding/editing templates) - 0.3h
      5. add "scheduled-task_ProcessStatusColor" tag, that will return "green" when process with PID from is still running AND return "grey" otherwise - 0.2h
      6. when displaying value of "LastRunProcessId" field use "scheduled-task_ProcessStatusColor" tag to color it dynamically - 0.3h

      Quote: 2h*1.4 = 3h

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3h
                  3h
                  Remaining:
                  Remaining Estimate - 3h
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified