Broadcast ignores
This commit is contained in:
parent
09418a905a
commit
14b59e17dc
@ -52,6 +52,13 @@ class MyServerProtocol(WebSocketServerProtocol):
|
||||
"job_data": obj["job_data"],
|
||||
"message": obj["message"]
|
||||
})
|
||||
elif type == "ignore":
|
||||
self.broadcastToDashboards({
|
||||
"type": type,
|
||||
"job_data": obj["job_data"],
|
||||
"url": obj["url"],
|
||||
"pattern": obj["pattern"],
|
||||
})
|
||||
|
||||
|
||||
class MyServerFactory(WebSocketServerFactory):
|
||||
|
@ -154,8 +154,7 @@ def acceptUrl(urlInfo, recordInfo, verdict, reasons):
|
||||
|
||||
pattern = shouldIgnoreURL(url, recordInfo)
|
||||
if pattern:
|
||||
if not os.path.exists(os.path.join(workingDir, "igoff")):
|
||||
printToReal("IGNOR %s by %s" % (url, pattern))
|
||||
maybeLogIgnore(url, pattern)
|
||||
return False
|
||||
|
||||
# If we get here, none of our ignores apply. Return the original verdict.
|
||||
@ -190,7 +189,15 @@ def handleError(urlInfo, recordInfo, errorInfo):
|
||||
|
||||
|
||||
def maybeLogIgnore(url, pattern):
|
||||
pass
|
||||
if not os.path.exists(os.path.join(workingDir, "igoff")):
|
||||
printToReal("IGNOR %s by %s" % (url, pattern))
|
||||
if wsFactory.client:
|
||||
wsFactory.client.sendObject({
|
||||
"type": "ignore",
|
||||
"job_data": getJobData(),
|
||||
"url": url,
|
||||
"pattern": pattern
|
||||
})
|
||||
|
||||
|
||||
# Regular expressions for server headers go here
|
||||
|
Loading…
x
Reference in New Issue
Block a user