-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
occ command for executing dataloads #16
- Loading branch information
Showing
4 changed files
with
59 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/** | ||
* Data Analytics | ||
* | ||
* This file is licensed under the Affero General Public License version 3 or | ||
* later. See the LICENSE.md file. | ||
* | ||
* @author Marcel Scherello <audioplayer@scherello.de> | ||
* @copyright 2020 Marcel Scherello | ||
*/ | ||
|
||
namespace OCA\Analytics\Command; | ||
|
||
use OCA\Analytics\Controller\DataloadController; | ||
use Symfony\Component\Console\Command\Command; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
class Load extends Command | ||
{ | ||
|
||
private $DataloadController; | ||
|
||
public function __construct( | ||
DataloadController $DataloadController | ||
) | ||
{ | ||
$this->DataloadController = $DataloadController; | ||
parent::__construct(); | ||
} | ||
|
||
protected function configure() | ||
{ | ||
$this | ||
->setName('analytics:load') | ||
->setDescription('execute a dataload') | ||
->addArgument( | ||
'dataloadId', | ||
InputArgument::REQUIRED, | ||
'dataload to be executed' | ||
); | ||
} | ||
|
||
protected function execute(InputInterface $input, OutputInterface $output) | ||
{ | ||
$dataloadId = $input->getArgument('dataloadId'); | ||
$this->DataloadController->execute($dataloadId); | ||
} | ||
} |
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