|
string | mdtext = '' |
| mdtext = ''.join(line.replace(", ,", ",") for line in jobtuple[0].split('
') if line[-3:-1] != ' ,') More...
|
|
| mdtop = json.JSONDecoder().decode(mdtext) |
|
| file_name = list(mdtop.keys())[0] |
|
Base class to hold / interpret general metadata
Definition at line 33 of file extractor_prod.py.
def extractor_prod.MetaData.__init__ |
( |
|
self, |
|
|
|
inputfile |
|
) |
| |
def extractor_prod.MetaData.extract_metadata_to_pipe |
( |
|
self | ) |
|
Extract metadata from inputfile into a pipe for further processing.
Definition at line 41 of file extractor_prod.py.
42 """Extract metadata from inputfile into a pipe for further processing.""" 45 proc = Popen([
"sam_metadata_dumper", local], stdout=PIPE,
49 proc = Popen([
"sam_metadata_dumper", url], stdout=PIPE,
51 if len(local) > 0
and local != self.
inputfile:
def extractor_prod.MetaData.get_job |
( |
|
self, |
|
|
|
proc |
|
) |
| |
Run the proc in a 60-sec timeout queue, return stdout, stderr
Definition at line 55 of file extractor_prod.py.
56 """Run the proc in a 60-sec timeout queue, return stdout, stderr""" 60 thread.join(timeout=7200)
62 print(
'Terminating subprocess because of timeout.')
69 raise RuntimeError(
'sam_metadata_dumper returned nonzero exit status {}.'.
format(rc))
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
def extractor_prod.MetaData.md_handle_application |
( |
|
md | ) |
|
|
static |
If there's no application key in md dict, create the key with a blank dictionary.
Then return md['application'], along with mdval
Definition at line 94 of file extractor_prod.py.
95 """If there's no application key in md dict, create the key with a blank dictionary. 96 Then return md['application'], along with mdval""" 97 if 'application' not in md:
98 md[
'application'] = {}
99 return md[
'application']
def extractor_prod.MetaData.mdart_gen |
( |
|
jobtuple | ) |
|
|
static |
Take Jobout and Joberr (in jobtuple) and return mdart object from that
Definition at line 82 of file extractor_prod.py.
83 """Take Jobout and Joberr (in jobtuple) and return mdart object from that"""
def extractor_prod.MetaData.wait_for_subprocess |
( |
|
jobinfo, |
|
|
|
q |
|
) |
| |
|
static |
Run jobinfo, put the return code, stdout, and stderr into a queue
Definition at line 73 of file extractor_prod.py.
74 """Run jobinfo, put the return code, stdout, and stderr into a queue""" 75 jobout, joberr = jobinfo.communicate()
77 for item
in (rc, jobout, joberr):
extractor_prod.MetaData.__metaclass__ = abc.ABCMeta |
|
staticprivate |
extractor_prod.MetaData.file_name = list(mdtop.keys())[0] |
|
static |
extractor_prod.MetaData.inputfile |
string extractor_prod.MetaData.mdtext = '' |
|
static |
mdtext = ''.join(line.replace(", ,", ",") for line in jobtuple[0].split('
') if line[-3:-1] != ' ,')
Definition at line 85 of file extractor_prod.py.
extractor_prod.MetaData.mdtop = json.JSONDecoder().decode(mdtext) |
|
static |
The documentation for this class was generated from the following file: