flux.job.submit module
- class flux.job.submit.SubmitFuture(future_handle, prefixes=None, pimpl_t=None)
Bases:
Future
Future subclass representing job IDs.
- get_id()
Return the job ID represented by this future.
- flux.job.submit.submit(flux_handle, jobspec, urgency=_flux._core.lib.FLUX_JOB_URGENCY_DEFAULT, waitable=False, debug=False, pre_signed=False)
Submit a job to Flux
Ask Flux to run a job, blocking until a job ID is assigned.
- Parameters
flux_handle (Flux) -- handle for Flux broker from flux.Flux()
jobspec (Jobspec or its string encoding) -- jobspec defining the job request
urgency (int) -- job urgency 0 (lowest) through 31 (highest) (default is 16). Priorities 0 through 15 are restricted to the instance owner.
waitable (bool) -- allow result to be fetched with job.wait() (default is False). Waitable=true is restricted to the instance owner.
debug (bool) -- enable job manager debugging events to job eventlog (default is False)
pre_signed (bool) -- jobspec argument is already signed (default is False)
- Returns
job ID
- Return type
int
- flux.job.submit.submit_async(flux_handle, jobspec, urgency=_flux._core.lib.FLUX_JOB_URGENCY_DEFAULT, waitable=False, debug=False, pre_signed=False, novalidate=False)
Ask Flux to run a job, without waiting for a response
Submit a job to Flux. This method returns immediately with a Flux Future, which can be used obtain the job ID later.
- Parameters
flux_handle (Flux) -- handle for Flux broker from flux.Flux()
jobspec (Jobspec or its string encoding) -- jobspec defining the job request
urgency (int) -- job urgency 0 (lowest) through 31 (highest) (default is 16). Priorities 0 through 15 are restricted to the instance owner.
waitable (bool) -- allow result to be fetched with job.wait() (default is False). Waitable=True is restricted to the instance owner.
debug (bool) -- enable job manager debugging events to job eventlog (default is False)
pre_signed (bool) -- jobspec argument is already signed (default is False)
novalidate (bool) -- jobspec does not need to be validated. (default is False) novalidate=True is restricted to the instance owner.
- Returns
a Flux Future object for obtaining the assigned jobid
- Return type