Skip to content

Commit

Permalink
pkp/pkp-lib#7105 Adding callable methods for queueing system to be us…
Browse files Browse the repository at this point in the history
…ed at tools/runScheduledTasks
  • Loading branch information
henriqueramos committed Jun 7, 2021
1 parent e526567 commit 41dea98
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tools/runScheduledTasks.php
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/**
* @file tools/runScheduledTasks.php
*
Expand All @@ -15,11 +17,17 @@

require(dirname(__FILE__) . '/bootstrap.inc.php');

import('lib.pkp.classes.cliTool.ScheduledTaskTool');
use PKP\cliTool\ScheduledTaskTool;

class runScheduledTasks extends ScheduledTaskTool
{
}

$tool = new runScheduledTasks($argv ?? []);
$tool->execute();
try {
app('pkpQueue')->runQueuedJobs();

$tool = new runScheduledTasks($argv ?? []);
$tool->execute();
} catch (\Exception $e) {
error_log($e->getTraceAsString());
}

0 comments on commit 41dea98

Please sign in to comment.