This commit is contained in:
wangjinlei
2022-11-23 14:48:15 +08:00
parent 0a92e69b83
commit ec59e99a8b
636 changed files with 59164 additions and 46329 deletions

View File

@@ -36,7 +36,7 @@ class Listen extends Command
public function initialize(Input $input, Output $output)
{
$this->listener = new Listener($this->findCommandPath());
$this->listener = new Listener(getcwd());
$this->listener->setSleep($input->getOption('sleep'));
$this->listener->setMaxTries($input->getOption('tries'));
@@ -57,9 +57,4 @@ class Listen extends Command
$this->listener->listen($queue, $delay, $memory, $timeout);
}
protected function findCommandPath()
{
return defined('ROOT_PATH') ? ROOT_PATH : dirname($_SERVER['argv'][0]);
}
}

View File

@@ -150,7 +150,7 @@ class Database extends Connector
->update([
'reserved' => 0,
'reserved_at' => null,
'attempts' => ['inc', 1]
'attempts' => ['exp', 'attempts + 1']
]);
}