| 
                    1
                 | 
                                    
                                                     | 
                
                 | 
                <?php  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    2
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    3
                 | 
                                    
                                                     | 
                
                 | 
                namespace Dtc\QueueBundle\DependencyInjection;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    4
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    5
                 | 
                                    
                                                     | 
                
                 | 
                use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    6
                 | 
                                    
                                                     | 
                
                 | 
                use Symfony\Component\Config\Definition\Processor;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    7
                 | 
                                    
                                                     | 
                
                 | 
                use Symfony\Component\DependencyInjection\ContainerBuilder;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    8
                 | 
                                    
                                                     | 
                
                 | 
                use Symfony\Component\HttpKernel\DependencyInjection\Extension;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    9
                 | 
                                    
                                                     | 
                
                 | 
                use Symfony\Component\Config\FileLocator;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    10
                 | 
                                    
                                                     | 
                
                 | 
                use Symfony\Component\DependencyInjection\Loader;  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    11
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    12
                 | 
                                    
                                                     | 
                
                 | 
                class DtcQueueExtension extends Extension  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    13
                 | 
                                    
                                                     | 
                
                 | 
                { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    14
                 | 
                                    
                             8                          | 
                
                 | 
                    public function load(array $configs, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    15
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    16
                 | 
                                    
                             8                          | 
                
                 | 
                        $processor = new Processor();  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    17
                 | 
                                    
                             8                          | 
                
                 | 
                        $configuration = new Configuration();  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    18
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    19
                 | 
                                    
                             8                          | 
                
                 | 
                        $config = $processor->processConfiguration($configuration, $configs);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    20
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configBeanstalkd($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    21
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configRabbitMQ($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    22
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configRedis($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    23
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    24
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.manager.job', $config['manager']['job']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    25
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.odm.document_manager', $config['odm']['document_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    26
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.orm.entity_manager', $config['orm']['entity_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    27
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.manager.run', isset($config['manager']['run']) ? $config['manager']['run'] : $config['manager']['job']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    28
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.manager.job_timing', isset($config['manager']['job_timing']) ? $config['manager']['job_timing'] : $container->getParameter('dtc_queue.manager.run')); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    29
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.priority.direction', $config['priority']['direction']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    30
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.priority.max', $config['priority']['max']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    31
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.retry.max.retries', $config['retry']['max']['retries']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    32
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.retry.max.failures', $config['retry']['max']['failures']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    33
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.retry.max.exceptions', $config['retry']['max']['exceptions']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    34
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.retry.max.stalls', $config['retry']['max']['stalls']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    35
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.retry.auto.failure', $config['retry']['auto']['failure']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    36
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.retry.auto.exception', $config['retry']['auto']['exception']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    37
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configClasses($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    38
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configRecordTimings($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    39
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configAdmin($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    40
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configDeprecated($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    41
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    42
                 | 
                                    
                                                     | 
                
                 | 
                        // Load Grid if Dtc\GridBundle Bundle is registered  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    43
                 | 
                                    
                             8                          | 
                
                 | 
                        $yamlLoader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    44
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    45
                 | 
                                    
                             8                          | 
                
                 | 
                        $yamlLoader->load('queue.yml'); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    46
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    47
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    48
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configDeprecated(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    49
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    50
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['default_manager'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    51
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.manager.job', $config['default_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    52
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    53
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['run_manager'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    54
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.manager.run', $config['run_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    55
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    56
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['job_timing_manager'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    57
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.manager.run', $config['job_timing_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    58
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    59
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['document_manager'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    60
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.odm.document_manager', $config['document_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    61
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    62
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['entity_manager'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    63
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.odm.entity_manager', $config['entity_manager']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    64
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    65
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configClassDeprecated($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    66
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configOtherDeprecated($config, $container);  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    67
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    68
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    69
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configClassDeprecated(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    70
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    71
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['class_job'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    72
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.class.job', $config['class_job']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    73
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    74
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['class_job_archive'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    75
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.class.job_archive', $config['class_job_archive']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    76
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    77
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['class_run'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    78
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.class.run', $config['class_run']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    79
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    80
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['class_run_archive'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    81
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.class.run_archive', $config['class_run_archive']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    82
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    83
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['class_job_timing'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    84
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.class.job_timing', $config['class_job_timing']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    85
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    86
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    87
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    88
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configOtherDeprecated(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    89
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    90
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['record_timings'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    91
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.timings.record', $config['record_timings']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    92
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    93
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['record_timings_timezone_offset'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    94
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.timings.timezone_offset', $config['record_timings_timezone_offset']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    95
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    96
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['record_timings_timezone_offset'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    97
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.timings.timezone_offset', $config['record_timings_timezone_offset']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    98
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    99
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['priority_max'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    100
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.priority.max', $config['priority_max']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    101
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    102
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['priority_direction'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    103
                 | 
                                    
                                                     | 
                
                 | 
                            $container->setParameter('dtc_queue.priority.direction', $config['priority_direction']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    104
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    105
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    106
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    107
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configRedis(array $config, ContainerBuilder $container)  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    108
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    109
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.redis.prefix', $config['redis']['prefix']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    110
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['redis']['snc_redis']['type'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    111
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.redis.snc_redis.type', $config['redis']['snc_redis']['type']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    112
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.redis.snc_redis.alias', $config['redis']['snc_redis']['alias']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    113
                 | 
                                    
                             7                          | 
                
                 | 
                        } elseif (isset($config['redis']['predis']['dsn'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    114
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.redis.predis.dsn', $config['redis']['predis']['dsn']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    115
                 | 
                                    
                             7                          | 
                
                 | 
                        } elseif (isset($config['redis']['predis']['connection_parameters']['host'])) { | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    116
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.redis.predis.connection_parameters', $config['redis']['predis']['connection_parameters']); | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    117
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    118
                 | 
                                    
                             8                          | 
                
                 | 
                        $this->configPhpRedis($config, $container);  | 
            
            
                                                                        
                            
            
                                    
            
            
                | 
                    119
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    120
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    121
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configPhpRedis(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    122
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    123
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.redis.phpredis.host', isset($config['redis']['phpredis']['host']) ? $config['redis']['phpredis']['host'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    124
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.redis.phpredis.port', isset($config['redis']['phpredis']['port']) ? $config['redis']['phpredis']['port'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    125
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.redis.phpredis.timeout', isset($config['redis']['phpredis']['timeout']) ? $config['redis']['phpredis']['timeout'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    126
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.redis.phpredis.retry_interval', isset($config['redis']['phpredis']['retry_interval']) ? $config['redis']['phpredis']['retry_interval'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    127
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.redis.phpredis.read_timeout', isset($config['redis']['phpredis']['read_timeout']) ? $config['redis']['phpredis']['read_timeout'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    128
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['redis']['phpredis']['auth'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    129
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.redis.phpredis.auth', $config['redis']['phpredis']['auth']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    130
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    131
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    132
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    133
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configAdmin(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    134
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    135
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.admin.chartjs', $config['admin']['chartjs']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    136
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    137
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    138
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configClasses(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    139
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    140
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.class.job', isset($config['class']['job']) ? $config['class']['job'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    141
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.class.job_archive', isset($config['class']['job_archive']) ? $config['class']['job_archive'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    142
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.class.run', isset($config['class']['run']) ? $config['class']['run'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    143
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.class.run_archive', isset($config['class']['run_archive']) ? $config['class']['run_archive'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    144
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.class.job_timing', isset($config['class']['job_timing']) ? $config['class']['job_timing'] : null); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    145
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    146
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    147
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configRecordTimings(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    148
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    149
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.timings.record', isset($config['timings']['record']) ? $config['timings']['record'] : false); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    150
                 | 
                                    
                             8                          | 
                
                 | 
                        $container->setParameter('dtc_queue.timings.timezone_offset', $config['timings']['timezone_offset']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    151
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    152
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    153
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configRabbitMQ(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    154
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    155
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['rabbit_mq'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    156
                 | 
                                    
                             1                          | 
                
                 | 
                            foreach (['host', 'port', 'user', 'password'] as $value) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    157
                 | 
                                    
                             1                          | 
                
                 | 
                                if (!isset($config['rabbit_mq'][$value])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    158
                 | 
                                    
                             1                          | 
                
                 | 
                                    throw new InvalidConfigurationException('dtc_queue: rabbit_mq must have '.$value.' in config.yml'); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    159
                 | 
                                    
                                                     | 
                
                 | 
                                }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    160
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    161
                 | 
                                    
                             1                          | 
                
                 | 
                            $config['rabbit_mq']['queue_args']['max_priority'] = $config['priority']['max'];  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    162
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.rabbit_mq', $config['rabbit_mq']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    163
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    164
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    165
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    166
                 | 
                                    
                             8                          | 
                
                 | 
                    protected function configBeanstalkd(array $config, ContainerBuilder $container)  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    167
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    168
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['beanstalkd'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    169
                 | 
                                    
                             1                          | 
                
                 | 
                            if (!isset($config['beanstalkd']['host'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    170
                 | 
                                    
                             1                          | 
                
                 | 
                                throw new InvalidConfigurationException('dtc_queue: beanstalkd requires host in config.yml'); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    171
                 | 
                                    
                                                     | 
                
                 | 
                            }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    172
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    173
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    174
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['beanstalkd']['host'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    175
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.beanstalkd.host', $config['beanstalkd']['host']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    176
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    177
                 | 
                                    
                             8                          | 
                
                 | 
                        if (isset($config['beanstalkd']['tube'])) { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    178
                 | 
                                    
                             1                          | 
                
                 | 
                            $container->setParameter('dtc_queue.beanstalkd.tube', $config['beanstalkd']['tube']); | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    179
                 | 
                                    
                                                     | 
                
                 | 
                        }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    180
                 | 
                                    
                             8                          | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    181
                 | 
                                    
                                                     | 
                
                 | 
                 | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    182
                 | 
                                    
                             1                          | 
                
                 | 
                    public function getAlias()  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    183
                 | 
                                    
                                                     | 
                
                 | 
                    { | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    184
                 | 
                                    
                             1                          | 
                
                 | 
                        return 'dtc_queue';  | 
            
            
                                                                                                            
                            
            
                                    
            
            
                | 
                    185
                 | 
                                    
                                                     | 
                
                 | 
                    }  | 
            
            
                                                                                                            
                                                                
            
                                    
            
            
                | 
                    186
                 | 
                                    
                                                     | 
                
                 | 
                }  | 
            
            
                                                        
            
                                    
            
            
                | 
                    187
                 | 
                                    
                                                     | 
                
                 | 
                 |