MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / _setup_queue_mode

Function _setup_queue_mode

keepercommander/service/api/routes.py:19–34  ·  view source on GitHub ↗

Setup queue mode with native v2 and synchronous v1 compatibility endpoints.

(app: Flask)

Source from the content-addressed store, hash-verified

17from ..decorators.security import limiter
18
19def _setup_queue_mode(app: Flask) -> None:
20 """Setup queue mode with native v2 and synchronous v1 compatibility endpoints."""
21 from ..core.request_queue import queue_manager
22 queue_manager.start()
23
24 command_bp = create_command_blueprint()
25 app.register_blueprint(command_bp, url_prefix='/api/v2')
26
27 legacy_bp = create_legacy_command_blueprint(use_queue=True)
28 app.register_blueprint(legacy_bp, url_prefix='/api/v1')
29
30 # Register onboarding endpoints
31 onboarding_bp = create_onboarding_blueprint()
32 app.register_blueprint(onboarding_bp, url_prefix='/api/v2')
33
34 logger.debug("Started queue manager and registered /api/v2 plus synchronous /api/v1 compatibility endpoints")
35
36def _setup_legacy_mode(app: Flask) -> None:
37 """Setup legacy mode with v1 API endpoints."""

Callers 1

init_routesFunction · 0.85

Calls 5

create_command_blueprintFunction · 0.85
startMethod · 0.45
debugMethod · 0.45

Tested by

no test coverage detected