common.services.process package

Submodules

common.services.process.HtmlProcessJobStatus module

common.services.process.HtmlProcessJobs module

File HtmlProcessJobs.py Author WJ Vriend (wjvriend@astro.rug.nl)

class common.services.process.HtmlProcessJobs.DpuQuery(*args, **kwargs)

Bases: common.config.ProfileThread.ProfileThread

class for querying all dpus in seperate threads and retrieving job info of the current user

query_current_user()

get all jobs from the dpu for the current user

class common.services.process.HtmlProcessJobs.HtmlProcessJobs(parent, args)

Bases: common.services.general.HtmlBase.HtmlBase

class for generating an overview of the user jobs on all dpus the parent object could implement :

test_version attribute to indicate a test version is running (True) or not (False), affects the dpu’s being shown setStatusMsg messages are being pushed to this method
classmethod deleteJob(dpu_name, job_id)

delete the specified job from the dpu

dpu_timeout = 10
extractProjectFromInfo(result)

Try to extract the project from one of the SubJobs dicts project is encoded in SubJobInfo as “my info string (project)”

classmethod getDPU(dpu_name)

return dpu with name dpu_name

getDPUs()

Return list of dpu hostnames Exclude test dpu’s when not in test mode

classmethod getDpuKey(username)

Return the key or password to use for the DPU, normally the password of the user is used as DPU key, but in case of SSO there is only the sso_ticket. Since the SSO ticket will change over time for an user, generate a key that doesn’t.

getExtraJavaScript()

(override) return extra javascript code to include

getHtml()

generate html

classmethod get_dpu_url(dpu)

return the dpu url

queryDPUs()

query all DPU’s in a separate thread for their job overview

setStatusMsg(msg)

push messsage to parent, if defined

showDPUs()

show the status of the dpu’s

showJob()

show the details of a job

showJobs()

generate the html to show the job overview

showOldLogs()

show the overview of old logs

show_buttons = True
show_prevlogs = True
status_letters = 'QRFEASU'
table_class = 'ProcessTable tablesorter'
table_id = 'table_jobs'
wait_for_threads(query_list)

wait for the threads to finish or dpu_timeout is reached

exception common.services.process.HtmlProcessJobs.HtmlProcessJobsError

Bases: Exception

class common.services.process.HtmlProcessJobs.HtmlProcessLogs(parent, args)

Bases: common.services.general.HtmlDir.HtmlDir

filter_filename(filename)

only use show filename if username is in it

list_filename(filename_list)

reverse the sorting of the filenames

common.services.process.HtmlProcessTree module

Module with the HtmlProcessTree class

class common.services.process.HtmlProcessTree.HtmlProcessTree(obj, obj_class, set_count=0, sub_count=0, config=None, stats=None, parent=None)

Bases: object

Class generates a html tree of an object and its dependencies, showing the state of the object and dependencies

BackgroundColor = {1: '#ccffcc', 1003: '#ddf', 999: '#f3f3ff', -24: '#ffcccc', -23: '#ddf', 1002: '#ddf', -21: '#88ee88', -14: '#ffcccc', -13: '#ffcccc', -12: '#ffcc99', -11: '#ccffcc', -10: '#ffcccc', 1001: '#f3f3ff', -22: '#ffcc99', -1: '#ffcccc'}
Color_Blue = '#ddf'
Color_DarkGreen = '#88ee88'
Color_Green = '#ccffcc'
Color_Orange = '#ffcc99'
Color_Red = '#ffcccc'
Color_Transparent = '#f3f3ff'
EMPTY_LIST_DEPENDENCY = 1003
LIST_DEPENDENCY = 1002
MainStatusText = {1: '', 1003: '(empty list)', 999: '(not checked)', -24: '(no object found)', -23: '(to be built)', 1002: '(list)', -21: '(fixed)', -14: '(flagged)', -13: '(outdated)', -12: '(obsolete)', -11: '(dependency missing)', -10: '(outdated)', 1001: '(null)', -22: '(new version available)', -1: '(rebuild)'}
NULL_DEPENDENCY = 1001
SubStatusText = {1: 'good', 1003: 'empty list', -24: 'no object', -23: 'new object', 1002: 'list', -21: 'fixed', -15: 'not target processor', -14: 'flag set', -13: 'parameter', -12: 'obsolete', -11: 'missing', -10: 'new version', 1001: 'null', -22: 'SHOULD NOT OCCUR !!', -1: 'rebuild'}
convertTreeElem(obj, txt_tree, object_text, fixed_status)

convert an element from the object list to html <li> item with tooltip

convertTreeProcessParams(process_params, txt_tree)

convert an object process_params to html <li> item with tooltip

formatObjectForErrors(obj, all_objects)

Format object from the uptodate dict

generateLIid(class_string)

generate an unique id for the HTML LI element

getHtml()

generate html

getObjectOverviewTableElements(uptodate_dict, obj)

(override) return the name,value pairs for the object overview table

getObjectOverviewTableErrors(uptodate_dict, obj)

(override) return the name,value pairs for the object overview table that are erronuous

getOnTheFlyValue(obj, txt_tree)

(overridde) determine and return onthefly status

makeHtmlTree()

make a html tree from the generated list

makeObjectOverviewTable(uptodate_val, uptodate_dict, obj)

make an overview table of the object, this can be used in a tooltip, showing a popup window

classmethod makeObjectString(obj)

(override) make an object specific string, default is object_id derived classes can use multiple attributes seperating them with cls.object_id_sep

object_id_sep = '|'
process_object_dialog_width = 500
process_params_dialog_width = 300
show_process_parameters = False
skipObject(parent_class, obj)

(override) return True if object does not need to be recursed default False

tip_table_class = 'ProcessTipTable'
walkObjectTree(obj, obj_class=None, txt_tree='', depth=0)

make a html tree view from an object (obj), arguments: obj_class the class of the object, obj can be None txt_tree total dependency string (example MasterFlatFrame.DomeFlatFrame)

class common.services.process.HtmlProcessTree.TreeStatistics

Bases: object

class keeping statistics about the objects and states encountered in the whole object tree

updateStatistics(obj, uptodate_val)

update the stats using the given object

Module contents