40 lines
880 B
PHP
40 lines
880 B
PHP
<?php
|
|
|
|
namespace App\Command;
|
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
use App\Service\RedisClientProvider;
|
|
|
|
class ResetHubJoCountCommand extends Command
|
|
{
|
|
protected $redis;
|
|
|
|
public function __construct(RedisClientProvider $redis)
|
|
{
|
|
$this->redis = $redis->getRedisClient();
|
|
|
|
parent::__construct();
|
|
}
|
|
|
|
protected function configure()
|
|
{
|
|
$this->setName('hub:jo:reset')
|
|
->setDescription('Reset hub\'s job order count')
|
|
->setHelp('Reset hub\'s job order count');
|
|
}
|
|
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
$key = 'hub_jo_count';
|
|
|
|
$this->redis->del($key);
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
|