mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix version3 imports
This commit is contained in:
parent
bdf459bad7
commit
e0fb4c6442
@ -16,12 +16,15 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MainPrompt(cmd.Cmd):
|
||||
def __init__(self, helper, tasks_manager, migration_manager, main_controller):
|
||||
def __init__(
|
||||
self, helper, tasks_manager, migration_manager, main_controller, import3
|
||||
):
|
||||
super().__init__()
|
||||
self.helper: Helpers = helper
|
||||
self.tasks_manager: TasksManager = tasks_manager
|
||||
self.migration_manager: MigrationManager = migration_manager
|
||||
self.controller: Controller = main_controller
|
||||
self.import3: Import3 = import3
|
||||
|
||||
# overrides the default Prompt
|
||||
self.prompt = f"Crafty Controller v{self.helper.get_version_string()} > "
|
||||
@ -101,7 +104,7 @@ class MainPrompt(cmd.Cmd):
|
||||
self.stdout.flush()
|
||||
|
||||
def do_import3(self, _line):
|
||||
Import3.start_import()
|
||||
self.import3.start_import()
|
||||
|
||||
def universal_exit(self):
|
||||
logger.info("Stopping all server daemons / threads")
|
||||
|
6
main.py
6
main.py
@ -6,6 +6,7 @@ import time
|
||||
import argparse
|
||||
import logging.config
|
||||
import signal
|
||||
from app.classes.shared.import3 import Import3
|
||||
import peewee
|
||||
from app.classes.models.users import HelperUsers
|
||||
from app.classes.shared.console import Console
|
||||
@ -133,6 +134,7 @@ if __name__ == "__main__":
|
||||
|
||||
# now the tables are created, we can load the tasks_manager and server controller
|
||||
controller = Controller(database, helper)
|
||||
import3 = Import3(helper, controller)
|
||||
tasks_manager = TasksManager(helper, controller)
|
||||
tasks_manager.start_webserver()
|
||||
|
||||
@ -194,7 +196,9 @@ if __name__ == "__main__":
|
||||
controller.clear_unexecuted_commands()
|
||||
controller.clear_support_status()
|
||||
|
||||
crafty_prompt = MainPrompt(helper, tasks_manager, migration_manager, controller)
|
||||
crafty_prompt = MainPrompt(
|
||||
helper, tasks_manager, migration_manager, controller, import3
|
||||
)
|
||||
|
||||
controller_setup_thread = Thread(target=controller_setup, name="controller_setup")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user