public function listen($interval = 5, $timeout = 0)
    {
        while (true) {
            // Process the current job if available
            // or sleep for a certain time
            if ($manager = $this->getManager($timeout)) {
                $manager->execute();
            } elseif ($interval > 0) {
                $this->sleep($interval);
            }
        }
    }