static function endJob($workflow_job_key, $workflow_job_config, $end_state = []) {
        $workflow_job_config = array_merge($workflow_job_config, [
            "status" => self::STATUS_COMPLETED,
            "end_state" => $end_state,
            "finished" => new \DateTime()
        ]);
        DataStore::saveWorkflowJob($workflow_job_key, $workflow_job_config);
        return $workflow_job_config;
    }