public function onKernelTerminate()
    {
        foreach ($this->managers as $key => $value) {
            if ($value['force_commit']) {
                try {
                    /** @var Manager $manager */
                    $manager = $this->container->get(sprintf('es.manager.%s', $key));
                } catch (\Exception $e) {
                    continue;
                }
                $manager->commit();
            }
        }
    }
public function onKernelTerminate()
    {
        foreach ($this->managers as $key => $value) {
            if ($value['force_commit']) {
                try {
                    /** @var Manager $manager */
                    $manager = $this->container->get(sprintf('es.manager.%s', $key));
                } catch (\Exception $e) {
                    continue;
                }
                $manager->commit();
            }
        }
    }
public function onKernelTerminate ( ) { foreach ( $ this -> managers as $ key => $ value ) { if ( $ value [ 'force_commit' ] ) { try { /** @var Manager $manager */ $ manager = $ this -> container -> get ( sprintf ( 'es.manager.%s' , $ key ) ) ; } catch ( \ Exception $ e ) { continue ; } $ manager -> commit ( ) ; } } }
Forces commit to elasticsearch on kernel terminate
Forces commit to elasticsearch on kernel terminate