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

showcrondebugging not obeyed by scheduled task cli tool

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.11.8, 4.0.2
    • 3.11.5
    • Tasks
    • MOODLE_311_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74182-master
    • Hide
      1. Create some forums and posts in those
      2. Run

        php admin/cli/scheduled_task.php --execute=\\mod_forum\\task\\cron_task --showsql
        

        Observe SQL output something like:

        SELECT pg_advisory_unlock($1, $2) AS unlocked
        [array (
          0 => -831030149,
          1 => 2127591,
        )]
        --------------------------------
        Query took: 0.00011992454528809 seconds.
        --------------------------------
        

      3. Run

        php admin/cli/scheduled_task.php --execute=\\mod_forum\\task\\cron_task
        

      4. Check the SQL output now doesn't display any SQL query
      5. Edit config.php and set $CFG->showcronsql = true; run

        php admin/cli/scheduled_task.php --execute=\\mod_forum\\task\\cron_task 
        

      6. Check that you still can see SQL output
      Show
      Create some forums and posts in those Run php admin/cli/scheduled_task.php --execute=\\mod_forum\\task\\cron_task --showsql Observe SQL output something like: SELECT pg_advisory_unlock($ 1 , $ 2 ) AS unlocked [array ( 0 => - 831030149 , 1 => 2127591 , )] -------------------------------- Query took: 0.00011992454528809 seconds. -------------------------------- Run php admin/cli/scheduled_task.php --execute=\\mod_forum\\task\\cron_task Check the SQL output now doesn't display any SQL query Edit config.php and set $CFG->showcronsql = true; run php admin/cli/scheduled_task.php --execute=\\mod_forum\\task\\cron_task Check that you still can see SQL output

      The scheduled_task CLI tool does not obey $CFG->showcrondebugging and showcronsql. While it does have separate flags that can enable it, adhoc_task.php does follow the $CFG values, while scheduled.php does not.

            emerrill Eric Merrill
            emerrill Eric Merrill
            Simey Lameze Simey Lameze
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 6 minutes
                1h 6m

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