From c69a18d89bbe2d4ec63c6ae5fe1d043d9e823f42 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 16 Mar 2021 08:19:20 +0000 Subject: [PATCH] Add command to reset hub jo count in redis. #543 --- src/Command/ResetHubJoCountCommand.php | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/Command/ResetHubJoCountCommand.php diff --git a/src/Command/ResetHubJoCountCommand.php b/src/Command/ResetHubJoCountCommand.php new file mode 100644 index 00000000..ea2314f3 --- /dev/null +++ b/src/Command/ResetHubJoCountCommand.php @@ -0,0 +1,39 @@ +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; + } +}