mirror of
https://github.com/InsanusMokrassar/docs.git
synced 2024-12-26 18:47:28 +00:00
initialization of plagubot description
This commit is contained in:
parent
655bdf2126
commit
0f845b03b7
@ -23,8 +23,10 @@ Bot is initializing with the next algorithm:
|
||||
```mermaid
|
||||
flowchart TB
|
||||
main["Main"]
|
||||
Join["Endless join bot work"]
|
||||
|
||||
subgraph ConfigReading
|
||||
direction LR
|
||||
ConfigJsonParsing["Parsing to Json"]
|
||||
ConfigParsing["Parsing to global config"]
|
||||
ConfigJsonParsing --> ConfigParsing
|
||||
@ -34,16 +36,60 @@ flowchart TB
|
||||
BotConstructorCalling["Calling of PlaguBot constructor"]
|
||||
|
||||
subgraph BotStart
|
||||
direction TB
|
||||
BotStartKoinAppInit["Initialization of koin app"]
|
||||
|
||||
subgraph BotStartSetupDI
|
||||
sample
|
||||
direction LR
|
||||
subgraph BotStartSetupDIPutDefaults["Put defaults in DI"]
|
||||
direction LR
|
||||
BotStartSetupDIPutDefaultsConfig["Config"]
|
||||
BotStartSetupDIPutDefaultsPluginsList["Plugins list"]
|
||||
BotStartSetupDIPutDefaultsDatabaseConfig["Database Config"]
|
||||
BotStartSetupDIPutDefaultsDefaultJson["Default Json"]
|
||||
BotStartSetupDIPutDefaultsPlagubot["PlaguBot itself"]
|
||||
BotStartSetupDIPutDefaultsTelegramBot["TelegramBot"]
|
||||
end
|
||||
BotStartSetupDIIncludes["`Synchronous (in queue) registration of all plugins __setupDI__ modules`"]
|
||||
|
||||
BotStartSetupDIPutDefaults --> BotStartSetupDIIncludes
|
||||
end
|
||||
BotStartKoinAppStart["`Starting of koin application. Since this step all modules from __setupDI__ of plugins will be available`"]
|
||||
|
||||
subgraph BotStartBehaviourContextInitialization["Initialization of behaviour context"]
|
||||
direction TB
|
||||
BotStartBehaviourContextInitializationStatesManager["`Get from DI or create default **DefaultStatesManagerRepo**`"]
|
||||
BotStartBehaviourContextInitializationStatesManagerRepo["`Get from DI or create default **StatesManagerRepo**`"]
|
||||
BotStartBehaviourContextInitializationStatesManagerUsedCondition{"Is the default one used?"}
|
||||
BotStartBehaviourContextInitializationOnStartConflictsResolver["Getting of all OnStartContextsConflictResolver"]
|
||||
BotStartBehaviourContextInitializationOnUpdateConflictsResolver["Getting of all OnUpdateContextsConflictResolver"]
|
||||
BotStartBehaviourContextInitializationStateHandlingErrorHandler["`Get from DI or create default **StateHandlingErrorHandler**`"]
|
||||
|
||||
subgraph BotStartBehaviourContextInitializationSetupPlugins["Plugins bot functionality init"]
|
||||
BotStartBehaviourContextInitializationSetupPluginsSetupBotPlugin["`Call **setupBotPlugin** for each plugin`"]
|
||||
end
|
||||
|
||||
BotStartBehaviourContextInitializationStatesManager --> BotStartBehaviourContextInitializationStatesManagerUsedCondition
|
||||
BotStartBehaviourContextInitializationStatesManagerUsedCondition --"Yes"--> BotStartBehaviourContextInitializationStatesManagerRepo
|
||||
BotStartBehaviourContextInitializationStatesManagerUsedCondition --"No"--> BotStartBehaviourContextInitializationStateHandlingErrorHandler
|
||||
BotStartBehaviourContextInitializationStatesManagerRepo --> BotStartBehaviourContextInitializationOnStartConflictsResolver
|
||||
BotStartBehaviourContextInitializationOnStartConflictsResolver --> BotStartBehaviourContextInitializationOnUpdateConflictsResolver
|
||||
BotStartBehaviourContextInitializationOnUpdateConflictsResolver --> BotStartBehaviourContextInitializationStateHandlingErrorHandler
|
||||
BotStartBehaviourContextInitializationStateHandlingErrorHandler --> BotStartBehaviourContextInitializationSetupPlugins
|
||||
end
|
||||
BotStartDeleteWebhook["Delete webhooks"]
|
||||
BotStartStartLongPolling["Start long polling"]
|
||||
|
||||
|
||||
BotStartKoinAppInit --> BotStartSetupDI
|
||||
BotStartSetupDI --> BotStartKoinAppStart
|
||||
BotStartKoinAppStart --> BotStartBehaviourContextInitialization
|
||||
BotStartBehaviourContextInitialization --> BotStartDeleteWebhook
|
||||
BotStartDeleteWebhook --> BotStartStartLongPolling
|
||||
end
|
||||
|
||||
main --> ConfigReading
|
||||
ConfigReading --> BotConstructorCalling
|
||||
BotConstructorCalling --> BotStart
|
||||
BotStart --> Join
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user