mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 03:54:17 +02:00
Add background print dispatching + tests
This commit is contained in:
@@ -237,70 +237,6 @@ if not app_settings.debug:
|
||||
|
||||
logging.info("Bambuddy starting - debug=%s, log_level=%s", app_settings.debug, log_level_str)
|
||||
|
||||
from backend.app.api.routes import (
|
||||
ams_history,
|
||||
api_keys,
|
||||
archives,
|
||||
auth,
|
||||
camera,
|
||||
cloud,
|
||||
discovery,
|
||||
external_links,
|
||||
filaments,
|
||||
firmware,
|
||||
github_backup,
|
||||
groups,
|
||||
inventory,
|
||||
kprofiles,
|
||||
library,
|
||||
local_presets,
|
||||
maintenance,
|
||||
metrics,
|
||||
notification_templates,
|
||||
notifications,
|
||||
pending_uploads,
|
||||
print_log,
|
||||
print_queue,
|
||||
printers,
|
||||
projects,
|
||||
settings as settings_routes,
|
||||
smart_plugs,
|
||||
spoolman,
|
||||
support,
|
||||
system,
|
||||
updates,
|
||||
users,
|
||||
virtual_printers,
|
||||
webhook,
|
||||
websocket,
|
||||
)
|
||||
from backend.app.api.routes.maintenance import _get_printer_maintenance_internal, ensure_default_types
|
||||
from backend.app.api.routes.support import init_debug_logging
|
||||
from backend.app.core.database import async_session, init_db
|
||||
from backend.app.core.websocket import ws_manager
|
||||
from backend.app.models.smart_plug import SmartPlug
|
||||
from backend.app.services.archive import ArchiveService
|
||||
from backend.app.services.bambu_ftp import download_file_async, get_ftp_retry_settings, with_ftp_retry
|
||||
from backend.app.services.bambu_mqtt import PrinterState
|
||||
from backend.app.services.github_backup import github_backup_service
|
||||
from backend.app.services.homeassistant import homeassistant_service
|
||||
from backend.app.services.mqtt_relay import mqtt_relay
|
||||
from backend.app.services.mqtt_smart_plug import mqtt_smart_plug_service
|
||||
from backend.app.services.notification_service import notification_service
|
||||
from backend.app.services.print_scheduler import scheduler as print_scheduler
|
||||
from backend.app.services.printer_manager import (
|
||||
init_printer_connections,
|
||||
printer_manager,
|
||||
printer_state_to_dict,
|
||||
)
|
||||
from backend.app.services.smart_plug_manager import smart_plug_manager
|
||||
from backend.app.services.spoolman import close_spoolman_client, get_spoolman_client, init_spoolman_client
|
||||
from backend.app.services.spoolman_tracking import (
|
||||
cleanup_tracking as _cleanup_spoolman_tracking,
|
||||
report_usage as _report_spoolman_usage,
|
||||
store_print_data as _store_spoolman_print_data,
|
||||
)
|
||||
from backend.app.services.tasmota import tasmota_service
|
||||
|
||||
# Track active prints: {(printer_id, filename): archive_id}
|
||||
_active_prints: dict[tuple[int, str], int] = {}
|
||||
|
||||
Reference in New Issue
Block a user