Base application context¶
Module contains base application and request class.
- class luna_python_matcher.app_common.base_application.MatcherBaseApp(*args, **kwargs)[source]¶
Base service application
- async static checkConnectionToAttributesDB(dbSettings)[source]¶
Check connections to temporary attributes db :param dbSettings: redis settings
- Returns:
True, if check was passed successfully, else False.
- Return type:
bool
- async static checkConnectionToEventsDB(dbSettings)[source]¶
Check connections to events db :param dbSettings: database settings
- Returns:
True, if check was passed successfully, else False.
- Return type:
bool
- async static checkConnectionToFacesDB(dbSettings)[source]¶
Check connections to faces db :param dbSettings: database settings
- Returns:
True, if check was passed successfully, else False.
- Return type:
bool
- class luna_python_matcher.app_common.base_application.MatcherBaseCtx[source]¶
Base luna-python-matcher context
- apiVersion: int¶
service api version
- attributesDBContext: RedisContext¶
attributes database context
- cmdArgs: Namespace¶
command line arguments
- configClass: BasePythonServiceSettingsClass¶
settings class
- defaultPort: int¶
default port
- eventsDBAdaptor: Optional[DBAdaptor]¶
events database adaptor
- eventsDBContext: DBContext¶
events database context
- facesDBAdaptor: Optional[DBAdaptor]¶
faces database adaptor
- facesDBContext: DBContext¶
faces database context
- host: str¶
service host
- monitoring: LunaRequestInfluxMonitoring¶
service monitoring
- pluginManager: PluginManager¶
plugin manager
- port: int¶
service port
- redisClient: Optional[Redis]¶
redis client
- serviceConfig: PythonServiceSettingsClass¶
service config
Luna Python Matcher application context¶
Sanic application server.
- class luna_python_matcher.app.app.PythonMatcherApp[source]¶
Python matcher application
- getRuntimeChecks(includeLunaServices=False)[source]¶
Returns configured system checks, pairs of (name, coroutine).
- Parameters:
includeLunaServices – A bool, whether to include checks for luna services.
- Return type:
List
[Tuple
[str
,Awaitable
]]
- class luna_python_matcher.app.app.PythonMatcherCtx[source]¶
Python matcher application context
- apiVersion: int¶
service api version
- attributesDBContext: AttributesDBContext¶
attributes database context
- cmdArgs: Namespace¶
command line arguments
- configClass: BasePythonServiceSettingsClass¶
settings class
- defaultPort: int¶
default port
- eventsDBAdaptor: Optional[DBAdaptor]¶
events database adaptor
- eventsDBContext: EventsDBContext¶
events database context
- facesDBAdaptor: Optional[DBAdaptor]¶
faces database adaptor
- facesDBContext: FacesDBContext¶
faces database context
- host: str¶
service host
- matcher: Optional[Matcher]¶
matcher
- monitoring: LunaRequestInfluxMonitoring¶
service monitoring
- pluginManager: PluginManager¶
plugin manager
- port: int¶
service port
- redisClient: Optional[Redis]¶
redis client
- serviceConfig: PythonServiceSettingsClass¶
service config
Luna Python Matcher Proxy application context¶
Application server.
- class luna_python_matcher.app_proxy.app.PythonMatcherProxyApp[source]¶
Python matcher proxy application
- getQueueSettings(settings)[source]¶
Get queue settings for matcher-proxy. :param settings: settings
- Returns:
QueueSettings
- Return type:
QueueSettings
- class luna_python_matcher.app_proxy.app.PythonMatcherProxyCtx[source]¶
Python matcher application context
- apiVersion: int¶
service api version
- attributesDBContext: AttributesDBContext¶
attributes database context
- cmdArgs: Namespace¶
command line arguments
- configClass: BasePythonServiceSettingsClass¶
settings class
- defaultPort: int¶
default port
- dispatcher: Dispatcher¶
dispatcher for matching
- eventsDBAdaptor: Optional[DBAdaptor]¶
events database adaptor
- eventsDBContext: EventsDBContext¶
events database context
- facesDBAdaptor: Optional[DBAdaptor]¶
faces database adaptor
- facesDBContext: FacesDBContext¶
faces database context
- host: str¶
service host
- luna3Session: Optional[Luna3Session]¶
luna3 client
- monitoring: LunaRequestInfluxMonitoring¶
service monitoring
- pluginManager: PluginManager¶
plugin manager
- port: int¶
service port
- redisClient: Optional[Redis]¶
redis client
- serviceConfig: PythonServiceSettingsClass¶
service config