manually control timeout, to dump trace data after hitting the limit

This commit is contained in:
Shish
2023-06-25 13:39:03 +01:00
parent 1d4c43f33b
commit b85e7ec209
10 changed files with 47 additions and 11 deletions

View File

@@ -24,10 +24,10 @@ class BulkAdd extends Extension
public function onPageRequest(PageRequestEvent $event)
{
global $page, $user;
global $page, $user, $_shm_timeout;
if ($event->page_matches("bulk_add")) {
if ($user->can(Permissions::BULK_ADD) && $user->check_auth_token() && isset($_POST['dir'])) {
set_time_limit(0);
$_shm_timeout->clear();
$bae = send_event(new BulkAddEvent($_POST['dir']));
foreach ($bae->results as $result) {
$this->theme->add_status("Adding files", $result);