OnCronCommand::configure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * For the full copyright and license information, please view the LICENSE.md
4
 * file that was distributed with this source code.
5
 */
6
7
namespace Notamedia\ConsoleJedi\Agent\Command;
8
9
use Bitrix\Main\Config\Option;
10
use Notamedia\ConsoleJedi\Application\Command\BitrixCommand;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
14
/**
15
 * Installation configurations for run Agents on cron.
16
 *
17
 * @author Nik Samokhvalov <[email protected]>
18
 */
19
class OnCronCommand extends BitrixCommand
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    protected function configure()
25
    {
26
        parent::configure();
27
28
        $this->setName('agent:on-cron')
29
            ->setDescription('Installation configurations for run Agents on cron');
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function execute(InputInterface $input, OutputInterface $output)
36
    {
37
        Option::set('main', 'agents_use_crontab', 'N');
38
        Option::set('main', 'check_agents', 'N');
39
    }
40
}
41