Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-85461

Make cron cli logs less verbose when waiting for more tasks with keep alive mode

XMLWordPrintable

    • Easy

      When running the various cron task cli scripts with keep aliive on there is a lot of log spam while it waits eg

       

      47c2340c574e:1799004 2025-05-12 17:35:14 Ran 0 adhoc tasks found at Mon, 12 May 2025 17:35:14 +1000
      47c2340c574e:1799004 2025-05-12 17:35:14 Cron run completed correctly
      47c2340c574e:1799004 2025-05-12 17:35:14 Cron completed at 17:35:14 in 0.050828 seconds. Memory used: 9.2 MB. Continuing to check for tasks for 2 more seconds.
      47c2340c574e:1799004 2025-05-12 17:35:15 Ran 0 adhoc tasks found at Mon, 12 May 2025 17:35:15 +1000
      47c2340c574e:1799004 2025-05-12 17:35:15 Cron run completed correctly
      47c2340c574e:1799004 2025-05-12 17:35:15 Cron completed at 17:35:15 in 0.049744 seconds. Memory used: 9.2 MB. Continuing to check for tasks for 1 more seconds.
      47c2340c574e:1799004 2025-05-12 17:35:16 Ran 0 adhoc tasks found at Mon, 12 May 2025 17:35:16 +1000
      47c2340c574e:1799004 2025-05-12 17:35:16 Cron run completed correctly
      47c2340c574e:1799004 2025-05-12 17:35:16 Cron completed at 17:35:16 in 0.05038 seconds. Memory used: 9.1 MB.
      

      I think it would be sufficient if it simple say how long it will wait for, and then started emitting logs again if it find a task, or if it stops waiting, eg

       

       

      47c2340c574e:1799004 2025-05-12 17:35:14 Ran 0 adhoc tasks found at Mon, 12 May 2025 17:35:14 +1000 
      47c2340c574e:1799004 2025-05-12 17:35:14 Cron run completed correctly 
      47c2340c574e:1799004 2025-05-12 17:35:14 Cron completed at 17:35:14 in 0.050828 seconds. Memory used: 9.2 MB. Continuing to check for tasks for 2 more seconds. 
      47c2340c574e:1799004 2025-05-12 17:35:16 Cron run completed correctly 
      47c2340c574e:1799004 2025-05-12 17:35:16 Cron completed at 17:35:16 in 0.05038 seconds. Memory used: 9.1 MB.

      The messages are slightly different for the different cli's but they all behave roughly the same.

       

            Unassigned Unassigned
            brendanheywood Brendan Heywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.