mdl_task_adhoc` error

mdl_task_adhoc` error

by Penghai Zhang -
Number of replies: 4
Hello Ken,

I am having this issue as well.

When my plugin creates an adhoc task, I can see there is a new record in table `mdl_task_adhoc` (And this was the ONLY record in this table). But the task was never completed.
Then I tried to run cron from browser, and I can see this error.



++ Failed to load task: \mod_equella\task\lti13_migration_task ++
* line 324 of /lib/classes/task/manager.php: call to debugging()
* line ? of unknownfile: call to core\task\manager::adhoc_task_from_record()
* line 661 of /lib/classes/task/manager.php: call to array_map()
* line 184 of /lib/cronlib.php: call to core\task\manager::get_next_adhoc_task()
* line 76 of /lib/cronlib.php: call to cron_run_adhoc_tasks()
* line 81 of /admin/cron.php: call to cron_run()
!!! Exception - Call to a member function get_concurrency_limit() on bool !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 674 of /lib/classes/task/manager.php: Error thrown
* line ? of unknownfile: call to core\task\manager::core\task\{closure}()
* line 673 of /lib/classes/task/manager.php: call to array_map()
* line 184 of /lib/cronlib.php: call to core\task\manager::get_next_adhoc_task()
* line 76 of /lib/cronlib.php: call to cron_run_adhoc_tasks()
* line 81 of /admin/cron.php: call to cron_run()
!!


If I use cli to execute the adhoc task, it can be completed quickly, and the record is removed from that table.

My adhoc task is pretty simple - just printing out some texts.

Do you have any idea ?


Thank you!
Average of ratings: -
In reply to Penghai Zhang

Re: Upgrading to 4.1.0 gives me this cron error!

by Ken Task -
Picture of Particularly helpful Moodlers
@ Penghai Zhang

Me thinks the only thing you have similar in this thread is a cron job issue.

I see mod_equella in your debug.

Not familiar with that plugin so maybe you can find something in following link:

https://docs.moodle.org/402/en/EQUELLA_repository
Requirements

EQUELLA 5.2 QA2 or higher is required for this repository plug-in to work correctly.

https://openequella.github.io/guides/MoodleIntegrationGuide.html

EQUELLA Moodle Configuration Guide link renders a 404 page

The plugin may not be compatible with 4.1. :|

'SoS', Ken

In reply to Ken Task

Re: Upgrading to 4.1.0 gives me this cron error!

by Penghai Zhang -
HI KEN,

I am one of the developers of EQUELLA. `mod_equella` is the plugin name.

We are adding new functionality to the plugin to support LTI 1.3.

To do this, we need to create a new adhoc task and run the task either manually through the script with `--execute` or through a cron job.

When we use cron, we have the error discussed here.
In reply to Ken Task

Re: Upgrading to 4.1.0 gives me this cron error!

by Penghai Zhang -
Thank you. The problem has been fixed.