Home | Trees | Indices | Help |
|
---|
|
object --+ | base.structure.StructureBase --+ | object --+ | | | base.common.Parser --+ | base.structure.ParseableStructure --+ | base.structure.Structure --+ | object --+ | | | base.macros.ExpansionDelegator --+ | Execute
a container for calling code.
This is a cron-like functionality. The jobs are run in separate threads, so they need to be thread-safe with respect to the rest of DaCHS. DaCHS serializes calls, though, so that your code should never run twice at the same time.
At least on CPython, you must make sure your code does not block with the GIL held; this is still in the server process. If you do daring things, fork off (note that you must not use any database connections you may have after forking, which means you can't safely use the RD passed in). See the docs on `Element job`_.
Then testing/debugging such code, use ``gavo admin execute rd#id`` to immediately run the jobs.
Nested Classes | |
Inherited from |
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
Class Methods | |
Inherited from |
Class Variables | |
name_ =
a sentinel for all kinds of undefined values. |
|
attrSeq =
|
|
managedAttrs =
|
|
Inherited from Inherited from |
Properties | |
rd | |
Inherited from |
Method Details |
spawns an external command, capturing the output and mailing it to the admin if it failed. Output is buffered and mailed, so it shouldn't be too large. This does not raise an exception if it failed (in normal usage, this would cause two mails to be sent). Instead, it returns the returncode of the spawned process; if that's 0, you're ok. But in general, you wouldn't want to check it. |
spawns a new python interpreter executing pythonFile. pythonFile may be resdir-relative. |
|
|
Class Variable Details |
attrSeq
|
managedAttrs
|
Property Details |
rd
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |