pcvs.orchestration.publishers module
- class pcvs.orchestration.publishers.Publisher(prefix='.')[source]
Bases:
object
Manage result publication and storage on disk.
Jobs are submitted to a publisher, forming a set of ready-to-be-flushed elements. Every time generate_file is invoked, tests are dumped to a file named after
pcvs_rawdat<id>.json
, whereid
is a automatic increment. Then, pool is emptied and waiting for new tests. This way, a single manager manages multiple files.- Variables
scheme – path to test result scheme
increment – used within filename
fn_fmt – filename format string
_layout – hierarchical representation of tests within the file
_destpath – target filepath
- flush()[source]
Flush down saved JSON-based jobs to a single file.
The Publisher is then reset for the next flush (next file).
- fn_fmt = 'pcvs_rawdat{:>04d}.json'
- property format
Return format type (currently only ‘json’ is supported).
- Returns
format as printable string
- Return type
- increment = 0
- scheme = None