mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-05-10 03:07:16 +00:00
Fixed safe to change PR comments. the next fixes of these PR would need to be tested
This commit is contained in:
@@ -141,10 +141,5 @@ def main():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
for i in range(1):
|
||||
try:
|
||||
main()
|
||||
except:
|
||||
import traceback
|
||||
print ('\n\n\n\n\n\n\n\n\n')
|
||||
traceback.print_exc()
|
||||
main()
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@ from ...core.events.types import HuntFinished
|
||||
global queue_lock
|
||||
queue_lock = Lock()
|
||||
|
||||
global is_running_lock
|
||||
is_running_lock = Lock()
|
||||
|
||||
|
||||
# Inherits Queue object, handles events asynchronously
|
||||
class EventQueue(Queue, object):
|
||||
@@ -26,10 +23,7 @@ class EventQueue(Queue, object):
|
||||
self.active_hunters = dict()
|
||||
|
||||
self.hooks = defaultdict(list)
|
||||
#is_running_lock.acquire()
|
||||
|
||||
self.running = True
|
||||
#is_running_lock.release()
|
||||
self.workers = list()
|
||||
|
||||
for i in range(num_worker):
|
||||
@@ -97,9 +91,7 @@ class EventQueue(Queue, object):
|
||||
|
||||
# stops execution of all daemons
|
||||
def free(self):
|
||||
#is_running_lock.acquire()
|
||||
self.running = False
|
||||
#is_running_lock.release()
|
||||
with self.mutex:
|
||||
self.queue.clear()
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import StringIO
|
||||
from ruamel.yaml import YAML
|
||||
|
||||
from collector import services, vulnerabilities, services_lock, vulnerabilities_lock
|
||||
import threading
|
||||
|
||||
|
||||
class YAMLReporter(object):
|
||||
|
||||
Reference in New Issue
Block a user