Skip to content

Commit

Permalink
init.py remove unnecessary capture, portscan, traceroute
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckablack committed Jan 18, 2021
1 parent 8addf38 commit 5d81b99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/quokka.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 7 additions & 20 deletions quokka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import quokka.views.worker_views

import quokka.models

db.create_all()

from quokka.models.apis import (
Expand All @@ -69,23 +70,12 @@
import_services,
import_workers,
)
from quokka.models.apis import get_all_devices, set_facts
from quokka.models.Host import Host

import_devices(filename="devices.yaml", filetype="yaml")
import_compliance(filename="compliance.yaml")
import_services(filename="services.yaml")
import_workers(filename="workers.yaml", filetype="yaml")

# Host.query.delete()

# Reset time-series data tables
from quokka.models.DeviceStatus import DeviceStatus
from quokka.models.HostStatus import HostStatus
from quokka.models.ServiceStatus import ServiceStatus

db.session.commit()

from quokka.controller.ThreadManager import ThreadManager

ThreadManager.start_device_threads(
Expand All @@ -100,15 +90,12 @@
ThreadManager.start_worker_thread(worker_monitor_interval)
ThreadManager.start_db_maintenance_thread()

from quokka.controller.CaptureManager import CaptureManager

capture_manager = CaptureManager()
from quokka.controller.PortscanManager import PortscanManager

portscan_manager = PortscanManager()
from quokka.controller.TracerouteManager import TracerouteManager

traceroute_manager = TracerouteManager()
# from quokka.controller.CaptureManager import CaptureManager
# capture_manager = CaptureManager()
# from quokka.controller.PortscanManager import PortscanManager
# portscan_manager = PortscanManager()
# from quokka.controller.TracerouteManager import TracerouteManager
# traceroute_manager = TracerouteManager()


def shutdown():
Expand Down

0 comments on commit 5d81b99

Please sign in to comment.