mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-67746 Tasks: Cleanup task logs in chunks.
This commit is contained in:
parent
4e41ace0be
commit
8dff481193
1 changed files with 4 additions and 1 deletions
|
@ -163,6 +163,9 @@ class database_logger implements task_logger {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$DB->delete_records_list('task_log', 'id', $logids);
|
$chunks = array_chunk($logids, 1000);
|
||||||
|
foreach ($chunks as $chunk) {
|
||||||
|
$DB->delete_records_list('task_log', 'id', $chunk);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue