Skip to main content

WithJobID

WithJobID gets a new context with JobId set. If the existing context already has a job id, the new context will have < old_jobID >/< new_jobID > set as the job id.

def WithJobID(
ctx: context.Context,
jobID: string
) - > context.Context

Gets a new context with JobId set. If the existing context already has a job id, the new context will have < old_jobID >/< new_jobID > set as the job id.

Parameters

NameTypeDescription
ctxcontext.ContextThe existing context to which the job ID will be added or appended.
jobIDstringThe new job ID to set in the context. If an existing job ID is present, this new ID will be appended to it.

Returns

TypeDescription
context.ContextA new context with the job ID incorporated.