From fda2cc636cd3df852c7dc7ca0f12b4696ff0553c Mon Sep 17 00:00:00 2001 From: LEZY Thomas Date: Thu, 29 May 2014 18:03:23 +0200 Subject: [PATCH] [ticket/12597] Changing place of lock release in execute() method PHPBB3-12597 --- phpBB/phpbb/console/command/cron/run.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/console/command/cron/run.php b/phpBB/phpbb/console/command/cron/run.php index 07949cc962..c0fb521c52 100644 --- a/phpBB/phpbb/console/command/cron/run.php +++ b/phpBB/phpbb/console/command/cron/run.php @@ -85,12 +85,15 @@ class run extends \phpbb\console\command\command $task_name = $input->getArgument('name'); if ($task_name) { - return $this->run_one($input, $output, $task_name); + $exit_status = $this->run_one($input, $output, $task_name); } else { - return $this->run_all($input, $output); + $exit_status = $this->run_all($input, $output); } + + $this->lock_db->release(); + return $exit_status; } else { @@ -134,7 +137,6 @@ class run extends \phpbb\console\command\command } } - $this->lock_db->release(); return 0; } @@ -163,13 +165,11 @@ class run extends \phpbb\console\command\command } $task->run(); - $this->lock_db->release(); return 0; } else { $output->writeln('' . $this->user->lang('CRON_NO_SUCH_TASK') . ''); - $this->lock_db->release(); return 2; } }