mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/12597] Changing place of lock release in execute() method
PHPBB3-12597
This commit is contained in:
parent
2f2e404639
commit
fda2cc636c
1 changed files with 5 additions and 5 deletions
|
@ -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('<error>' . $this->user->lang('CRON_NO_SUCH_TASK') . '</error>');
|
||||
$this->lock_db->release();
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue