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();
            }
        }
    }