File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44import os
55import sys
6- import yaml
76import time
8- import socket
97import sqlite3
108import logging
119import threading
1210import logging .config
1311from Queue import Queue
1412
15- from workflowwebtools import workflowinfo
13+ import yaml
1614from workflowmonit .stompAMQ import stompAMQ
1715import workflowmonit .workflowCollector as wc
1816
Original file line number Diff line number Diff line change 1919
2020 while True :
2121 schedule .run_pending ()
22- time .sleep (1 )
22+ time .sleep (1 )
Original file line number Diff line number Diff line change @@ -793,34 +793,6 @@ def reportaction(self):
793793 return output
794794
795795
796- @cherrypy .expose
797- @cherrypy .tools .json_out ()
798- def getfailedworkflows (self , failurerate = 0.2 ):
799- """
800- The page at ``https://localhost:8080/getfailedworkflows``
801- returns a list of workflows with failure rate larger than ``failurerate``.
802-
803- :param float failurerate: The failure rate threshold to report workflows
804-
805- :returns: JSON-formatted information containing workflow names and
806- corresponding failure rate.
807-
808- :rtype: JSON
809- """
810- wflist = errorutils .get_workflow_list_from_location (
811- serverconfig .all_errors_path ()
812- )
813-
814- wf_rate = dict ()
815- for wf in wflist :
816- frate = workflowinfo .WorkflowInfo (wf ).get_failure_rate ()
817- if isinstance (frate , dict ): frate = 0.
818- if frate < failurerate : continue
819- wf_rate .update ( {wf : round (frate , 5 )} )
820-
821- return wf_rate
822-
823-
824796 @cherrypy .expose
825797 def explainerror (self , errorcode = '0' , workflowstep = '/' ):
826798 """Returns an explaination of the error code, along with a link returning to table
You can’t perform that action at this time.
0 commit comments