mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 02:00:51 -04:00
Catch the AutoloadNotAllowedException also for legacy jobs
* same as #18839 for legacy jobs * avoids spamming the log with useless entries
This commit is contained in:
parent
3e0f106876
commit
aecfcf64c4
1 changed files with 9 additions and 2 deletions
|
|
@ -22,10 +22,17 @@
|
|||
|
||||
namespace OC\BackgroundJob\Legacy;
|
||||
|
||||
use OCP\AutoloadNotAllowedException;
|
||||
|
||||
class RegularJob extends \OC\BackgroundJob\Job {
|
||||
public function run($argument) {
|
||||
if (is_callable($argument)) {
|
||||
call_user_func($argument);
|
||||
try {
|
||||
if (is_callable($argument)) {
|
||||
call_user_func($argument);
|
||||
}
|
||||
} catch (AutoloadNotAllowedException $e) {
|
||||
// job is from a disabled app, ignore
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue