protected function markJobAsCompleted($pipe, $id, $failed)
    {
        $failed
            ? $pipe->hmset($id, ['status' => 'failed'])
            : $pipe->hmset($id, ['status' => 'completed', 'completed_at' => str_replace(',', '.', microtime(true))]);

        $pipe->expireat($id, Chronos::now()->addMinutes($this->recentJobExpires)->getTimestamp());
    }