未在控制台命令中调用事件订阅服务器

时间:2014-07-23 13:27:06

标签: symfony elastica

我必须在cron上运行命令来更新数据库。但是,这似乎会给我的Elastica索引带来问题。大概是因为事件订阅者没有被命令调用。

我的服务看起来像这样

fos_elastica.listener.application.client:
        class: 'Alpha\RMSBundle\EventListener\ClientListener'
        arguments:
            - '@fos_elastica.object_persister.application.client'
            - 'Alpha\RMSBundle\Entity\Position'
            - ['postPersist', 'postUpdate', 'postRemove', 'preRemove']
            - id
        calls:
            - [ setContainer, [ '@service_container' ] ]
        tags:
            - { name: 'doctrine.event_subscriber' }

有没有办法确保调用事件订阅者?

0 个答案:

没有答案
相关问题