-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
Copy pathdi.xml
50 lines (50 loc) · 2.54 KB
/
di.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Cron\Model\ConfigInterface" type="Magento\Cron\Model\Config" />
<preference for="Magento\Cron\Model\DeadlockRetrierInterface" type="Magento\Cron\Model\DeadlockRetrier" />
<type name="Magento\Config\Model\Config\Structure\Converter">
<plugin name="cron_backend_config_structure_converter_plugin" type="Magento\Cron\Model\Backend\Config\Structure\Converter" />
</type>
<type name="Magento\Framework\App\Config\Initial\Converter">
<plugin name="cron_system_config_initial_converter_plugin" type="Magento\Cron\Model\System\Config\Initial\Converter" />
</type>
<virtualType name="Magento\Cron\Model\VirtualLoggerHandler" type="Magento\Framework\Logger\Handler\Base">
<arguments>
<argument name="fileName" xsi:type="string">/var/log/cron.log</argument>
</arguments>
</virtualType>
<virtualType name="Magento\Cron\Model\VirtualLogger" type="Magento\Framework\Logger\Monolog">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="system" xsi:type="object">Magento\Cron\Model\VirtualLoggerHandler</item>
</argument>
</arguments>
</virtualType>
<!-- @api -->
<virtualType name="shellBackground" type="Magento\Framework\Shell">
<arguments>
<argument name="commandRenderer" xsi:type="object">Magento\Framework\Shell\CommandRendererBackground</argument>
</arguments>
</virtualType>
<type name="Magento\Cron\Observer\ProcessCronQueueObserver">
<arguments>
<argument name="shell" xsi:type="object">shellBackground</argument>
<argument name="logger" xsi:type="object">Magento\Cron\Model\VirtualLogger</argument>
</arguments>
</type>
<type name="Magento\Framework\Console\CommandListInterface">
<arguments>
<argument name="commands" xsi:type="array">
<item name="cronCommand" xsi:type="object">Magento\Cron\Console\Command\CronCommand</item>
<item name="cronInstall" xsi:type="object">Magento\Cron\Console\Command\CronInstallCommand</item>
<item name="cronRemove" xsi:type="object">Magento\Cron\Console\Command\CronRemoveCommand</item>
</argument>
</arguments>
</type>
</config>