Source code for tcmu.job.workflow_status

from tcmu.job import workflow_db
from tcmu import cache
import os
import sys

@cache
def _detect_hsh():
	file = os.getcwd()
	all_data = workflow_db.read_all()
	for hsh, data in all_data.items():
		if hsh in file:
			return hsh


[docs] def stage(message): hsh = _detect_hsh() # if the job is not managed by tcmu we simply print the message if hsh is None: print(message) return # otherwise update the workflow DB workflow_db.update(hsh, stage=message)