ad_job (public)
ad_job [ -queue queue ] [ -timeout timeout ] [ args... ]
Defined in packages/acs-tcl/tcl/utilities-procs.tcl
Convenience wrapper for simple usages of ns_job provided by NaviServer. The provided command (args) is executed in a separate thread of the specified job queue. On success the function returns the result of the provided command. If the queue does not exist, the queue is generated on the fly with default settings. When the timeout is specified and it expires, the client side will raise an error. Note that the executing job is not canceled but will run to its end.
- Switches:
- -queue (optional, defaults to
"jobs"
)- Name of job queue
- -timeout (optional)
- timeout for job, specified in seconds or as a number with a time unit (e.g., 10ms)
- Returns:
- result of the specified command
- Author:
- Gustaf Neumann
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- ad_job