-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not send -1 when Job is scheduled
- Loading branch information
Showing
9 changed files
with
106 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
multiflexi (1.24.0) UNRELEASED; urgency=medium | ||
multiflexi (1.25.0) UNRELEASED; urgency=medium | ||
|
||
* new cli tool | ||
|
||
-- vitex <[email protected]> Sun, 19 Jan 2025 20:03:39 +0100 | ||
|
||
multiflexi (1.24.0) jammy; urgency=medium | ||
|
||
* api@debian works now | ||
|
||
-- vitex <[email protected]> Fri, 17 Jan 2025 04:11:44 +0100 | ||
-- vitex <[email protected]> Sun, 19 Jan 2025 20:03:19 +0100 | ||
|
||
multiflexi (1.23.0) jammy; urgency=medium | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* MultiFlexi - | ||
* This file is part of the MultiFlexi package | ||
* | ||
* https://multiflexi.eu/ | ||
* | ||
* @author Vítězslav Dvořák <[email protected]> | ||
* @copyright 2020 Vitex Software | ||
* (c) Vítězslav Dvořák <http://vitexsoftware.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace MultiFlexi\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Description of Application | ||
* Description of Application. | ||
* | ||
* @author Vitex <[email protected]> | ||
* @author Vitex <[email protected]> | ||
*/ | ||
class Application extends Command { | ||
class Application extends Command | ||
{ | ||
protected function configure(): void | ||
{ | ||
$this | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* MultiFlexi - | ||
* This file is part of the MultiFlexi package | ||
* | ||
* https://multiflexi.eu/ | ||
* | ||
* @author Vítězslav Dvořák <[email protected]> | ||
* @copyright 2020 Vitex Software | ||
* (c) Vítězslav Dvořák <http://vitexsoftware.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace MultiFlexi\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Description of Company | ||
* Description of Company. | ||
* | ||
* @author Vitex <[email protected]> | ||
* @author Vitex <[email protected]> | ||
*/ | ||
class Company extends Command{ | ||
class Company extends Command | ||
{ | ||
protected function configure(): void | ||
{ | ||
$this | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* MultiFlexi - | ||
* This file is part of the MultiFlexi package | ||
* | ||
* https://multiflexi.eu/ | ||
* | ||
* @author Vítězslav Dvořák <[email protected]> | ||
* @copyright 2020 Vitex Software | ||
* (c) Vítězslav Dvořák <http://vitexsoftware.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace MultiFlexi\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Description of CredentialType | ||
* Description of CredentialType. | ||
* | ||
* @author Vitex <[email protected]> | ||
* @author Vitex <[email protected]> | ||
*/ | ||
class CredentialType extends Command { | ||
class CredentialType extends Command | ||
{ | ||
protected function configure(): void | ||
{ | ||
$this | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* MultiFlexi - | ||
* This file is part of the MultiFlexi package | ||
* | ||
* https://multiflexi.eu/ | ||
* | ||
* @author Vítězslav Dvořák <[email protected]> | ||
* @copyright 2020 Vitex Software | ||
* (c) Vítězslav Dvořák <http://vitexsoftware.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace MultiFlexi\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Description of Job | ||
* Description of Job. | ||
* | ||
* @author Vitex <[email protected]> | ||
* @author Vitex <[email protected]> | ||
*/ | ||
class Job extends Command { | ||
class Job extends Command | ||
{ | ||
protected function configure(): void | ||
{ | ||
$this | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,30 +19,31 @@ | |
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
use Ease\Shared; | ||
|
||
/** | ||
* Description of Status. | ||
* | ||
* @author Vitex <[email protected]> | ||
*/ | ||
class JobStatus extends Command { | ||
|
||
protected function configure(): void { | ||
class JobStatus extends Command | ||
{ | ||
protected function configure(): void | ||
{ | ||
$this | ||
->setName('jobstatus') | ||
->setDescription('Prints Jobs Status') | ||
->addOption('--format', '-f', InputOption::VALUE_OPTIONAL, 'The output format: text or json. Defaults to text.', 'text') | ||
->setHelp('This command prints status of jobs and its schedule'); | ||
->setName('jobstatus') | ||
->setDescription('Prints Jobs Status') | ||
->addOption('--format', '-f', InputOption::VALUE_OPTIONAL, 'The output format: text or json. Defaults to text.', 'text') | ||
->setHelp('This command prints status of jobs and its schedule'); | ||
} | ||
|
||
// 09 implementing the execute method | ||
protected function execute(InputInterface $input, OutputInterface $output): int { | ||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
$engine = new \MultiFlexi\Engine(); | ||
$pdo = $engine->getPdo(); | ||
$database = $pdo->getAttribute(\PDO::ATTR_DRIVER_NAME) . ' ' . | ||
$pdo->getAttribute(\PDO::ATTR_CONNECTION_STATUS) . ' ' . | ||
$pdo->getAttribute(\PDO::ATTR_SERVER_INFO) . ' ' . | ||
$database = $pdo->getAttribute(\PDO::ATTR_DRIVER_NAME).' '. | ||
$pdo->getAttribute(\PDO::ATTR_CONNECTION_STATUS).' '. | ||
$pdo->getAttribute(\PDO::ATTR_SERVER_INFO).' '. | ||
$pdo->getAttribute(\PDO::ATTR_SERVER_VERSION); | ||
|
||
$queeLength = (new \MultiFlexi\Scheduler())->listingQuery()->count(); | ||
|
@@ -78,7 +79,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
$output->writeln(json_encode($status, \JSON_PRETTY_PRINT)); | ||
} else { | ||
foreach ($status as $key => $value) { | ||
$output->writeln(str_replace('_', ' ', $key) . ': ' . $value); | ||
$output->writeln(str_replace('_', ' ', $key).': '.$value); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* MultiFlexi - | ||
* This file is part of the MultiFlexi package | ||
* | ||
* https://multiflexi.eu/ | ||
* | ||
* @author Vítězslav Dvořák <[email protected]> | ||
* @copyright 2020 Vitex Software | ||
* (c) Vítězslav Dvořák <http://vitexsoftware.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace MultiFlexi\Command; | ||
|
||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Input\InputOption; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Description of RunTemplate | ||
* Description of RunTemplate. | ||
* | ||
* @author Vitex <[email protected]> | ||
* @author Vitex <[email protected]> | ||
*/ | ||
class RunTemplate extends Command { | ||
|
||
protected function configure(): void { | ||
class RunTemplate extends Command | ||
{ | ||
protected function configure(): void | ||
{ | ||
$this | ||
->setName('runtemplate') | ||
->setDescription('Runtemplate operations') | ||
->addOption('--format', '-f', InputOption::VALUE_OPTIONAL, 'The output format: text or json. Defaults to text.', 'text') | ||
->addArgument('operation', InputArgument::REQUIRED, 'what to do with RunTemplate') | ||
->addArgument('id', InputArgument::OPTIONAL, 'which RunTemplate ?') | ||
->setHelp(<<<EOT | ||
->setName('runtemplate') | ||
->setDescription('Runtemplate operations') | ||
->addOption('--format', '-f', InputOption::VALUE_OPTIONAL, 'The output format: text or json. Defaults to text.', 'text') | ||
->addArgument('operation', InputArgument::REQUIRED, 'what to do with RunTemplate') | ||
->addArgument('id', InputArgument::OPTIONAL, 'which RunTemplate ?') | ||
->setHelp(<<<'EOT' | ||
The <info>runtemplate</info> command mangafe runtemplate | ||
<info>multilflexi-cli runtemplate trigger 220</info> | ||
|
@@ -38,8 +45,8 @@ protected function configure(): void { | |
EOT); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output): int { | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
$runTemplate = new \MultiFlexi\RunTemplate(is_numeric($input->getArgument('id')) ? (int) $input->getArgument('id') : $input->getArgument('id')); | ||
|
||
switch ($input->getArgument('operation')) { | ||
|
@@ -57,7 +64,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
break; | ||
} | ||
|
||
|
||
return Command::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters