services:
    JMose\CommandSchedulerBundle\Controller\DetailController:
        public: true
        autowire: true
        calls:
            - [setManagerName, ["%jmose_command_scheduler.doctrine_manager%"]]
            - [setTranslator, ["@translator"]]
        tags: [container.service_subscriber]

    JMose\CommandSchedulerBundle\Controller\ListController:
        public: true
        autowire: true
        calls:
            - [setManagerName, ["%jmose_command_scheduler.doctrine_manager%"]]
            - [setTranslator, ["@translator"]]
            - [setLockTimeout, ["%jmose_command_scheduler.lock_timeout%"]]
        tags: [container.service_subscriber]

    JMose\CommandSchedulerBundle\Service\CommandParser:
        arguments:
            - "@kernel"
            - "%jmose_command_scheduler.excluded_command_namespaces%"
            - "%jmose_command_scheduler.included_command_namespaces%"

    JMose\CommandSchedulerBundle\Form\Type\CommandChoiceType:
        autowire: true
        tags:
            - { name: form.type, alias: command_choice }

    JMose\CommandSchedulerBundle\Command\ExecuteCommand:
        arguments:
            - "@doctrine"
            - "%jmose_command_scheduler.doctrine_manager%"
            - "%jmose_command_scheduler.log_path%"
        tags: [console.command]

    JMose\CommandSchedulerBundle\Command\MonitorCommand:
        arguments:
            - "@doctrine"
            - "%jmose_command_scheduler.doctrine_manager%"
            - "%jmose_command_scheduler.lock_timeout%"
            - "%jmose_command_scheduler.monitor_mail%"
            - "%jmose_command_scheduler.monitor_mail_subject%"
            - "%jmose_command_scheduler.send_ok%"
        tags: [console.command]
        
    JMose\CommandSchedulerBundle\Command\UnlockCommand:
        arguments:
            - "@doctrine"
            - "%jmose_command_scheduler.doctrine_manager%"
            - "%jmose_command_scheduler.lock_timeout%"
        tags: [console.command]

    JMose\CommandSchedulerBundle\Command\StartSchedulerCommand:
        tags: [console.command]

    JMose\CommandSchedulerBundle\Command\StopSchedulerCommand:
        tags: [console.command]
