pipen.job
The job for pipen
CMD_WRAPPER_SHELL
— The shell to run the wrapped scriptCMD_WRAPPER_TEMPLATE
— The template for job wrapping_error_retry
— Whether we should retry if error happened_num_retries
— Total number of retries_rc
— The return code of the job_status
— The status of the job_wrapped_cmd
— The wrapped cmd, used for job submissioncached
— Check if a job is cached</>cmd
— The commandhook_done
— Mark whether hooks have already been. Since we don't havea trigger for job finished/failed, so we do a polling on it. This is to avoid calling the hooks repeatedlyindex
— The index of the jobjid
— The jid of the job in scheduler systemjid
(int | str | none) — Get the jid of the job in scheduler system</>jid_file
(Path) — The jid file of the job</>metadir
— The metadir of the jobrc
(int) — The return code of the job</>rc_file
(Path) — The rc file of the job</>retry_dir
(Path) — The retry directory of the job</>script_file
— Get the path to script file</>signature_file
— Get the path to the signature file</>status
(int) — Query the status of the job
If the job is submitted, try to query it from the status file Make sure the status is updated by trap in wrapped script </>status_file
(Path) — The status file of the job</>stderr_file
(Path) — The stderr file of the job</>stdout_file
(Path) — The stdout file of the job</>strcmd
(str) — Get the string representation of the command</>trial_count
— The count for re-tries
__repr__
(
)
(str) — repr of the job</>cache
(
)
— write signature to signature file</>clean
(
retry
)
— Clean up the meta files</>log
(
level
,msg
,*args
,limit
,limit_indicator
,logger
)
— Log message for the jobs</>prepare
(
proc
)
— Prepare the job by given process</>shebang
(
scheduler
)
(str) — The shebang of the wrapped script</>wrapped_script
(
scheduler
)
(PathLike) — Get the wrapped script</>
abc.
ABCMeta
(
name
, bases
, namespace
, **kwargs
)
Metaclass for defining Abstract Base Classes (ABCs).
Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
__instancecheck__
(
cls
,instance
)
— Override for isinstance(instance, cls).</>__subclasscheck__
(
cls
,subclass
)
— Override for issubclass(subclass, cls).</>register
(
cls
,subclass
)
— Register a virtual subclass of an ABC.</>
register
(
cls
, subclass
)
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
__instancecheck__
(
cls
, instance
)
Override for isinstance(instance, cls).
__subclasscheck__
(
cls
, subclass
)
Override for issubclass(subclass, cls).
__repr__
(
)
→ str
repr of the job
shebang
(
scheduler
)
→ str
The shebang of the wrapped script
clean
(
retry=False
)
Clean up the meta files
retry
(optional) — Whether clean it for retrying
wrapped_script
(
scheduler
)
Get the wrapped script
scheduler
(Scheduler) — The scheduler
The path of the wrapped script
log
(
level
, msg
, *args
, limit=3
, limit_indicator=True
, logger=<LoggerAdapter pipen.core (WARNING)>
)
Log message for the jobs
level
(int | str) — The log level of the recordmsg
(str) — The message to log*args
— The arguments to format the messagelimit
(int, optional) — limitation of the log (don't log for all jobs)limit_indicator
(bool, optional) — Whether to show an indicator saying the loghas been limited (the level of the indicator will be DEBUG)logger
(LoggerAdapter, optional) — The logger used to log
prepare
(
proc
)
Prepare the job by given process
Primarily prepare the script, and provide cmd to the job for xqute to wrap and run
proc
(Proc) — the process object