Skip to content

Commit 1fd079d

Browse files
authored
Merge pull request #3 from phylsix/merge-trial
remove unused imports and functions
2 parents 42d3223 + 405d275 commit 1fd079d

3 files changed

Lines changed: 2 additions & 32 deletions

File tree

workflowmonit/sendToMonit.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33

44
import os
55
import sys
6-
import yaml
76
import time
8-
import socket
97
import sqlite3
108
import logging
119
import threading
1210
import logging.config
1311
from Queue import Queue
1412

15-
from workflowwebtools import workflowinfo
13+
import yaml
1614
from workflowmonit.stompAMQ import stompAMQ
1715
import workflowmonit.workflowCollector as wc
1816

workflowmonit/workflowMonitScheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
while True:
2121
schedule.run_pending()
22-
time.sleep(1)
22+
time.sleep(1)

workflowwebtools/workflowtools.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)