From 3912ce2ba48197c4963ec7017d2a5d0e71b4adaa Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 21 May 2022 15:48:57 +0600 Subject: [PATCH 1/4] start 1.0.1 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bab58f..507bb8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 1.0.1 + ## 1.0.0 * `Versions` diff --git a/gradle.properties b/gradle.properties index 5707ff5..73954b8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ kotlin.js.generate.externals=true kotlin.incremental=true group=dev.inmo -version=1.0.0 +version=1.0.1 From e2294965ff5afa198b0f941ea5533c8d24da4663 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 21 May 2022 15:52:37 +0600 Subject: [PATCH 2/4] updates in dependencies and update bot setup logic --- CHANGELOG.md | 6 ++++++ .../main/kotlin/dev/inmo/plagubot/PlaguBot.kt | 20 ++++++++++++------- gradle/libs.versions.toml | 4 ++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 507bb8d..ba30dd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## 1.0.1 +* `Versions` + * `tgbotapi`: `1.1.3` + * `microutils`: `0.10.5` +* `Plugin`: + * All plugins will be loaded in parallel + ## 1.0.0 * `Versions` diff --git a/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt b/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt index f698aa2..f57d5a3 100644 --- a/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt +++ b/bot/src/main/kotlin/dev/inmo/plagubot/PlaguBot.kt @@ -1,5 +1,6 @@ package dev.inmo.plagubot +import dev.inmo.micro_utils.coroutines.runCatchingSafely import dev.inmo.plagubot.config.* import dev.inmo.tgbotapi.bot.ktor.telegramBot import dev.inmo.tgbotapi.extensions.api.webhook.deleteWebhook @@ -56,15 +57,20 @@ data class PlaguBot( } override suspend fun BehaviourContext.setupBotPlugin(koin: Koin) { - config.plugins.forEach { - runCatching { - with(it) { - setupBotPlugin(koin) + config.plugins.map { + launch { + runCatchingSafely { + logger.info("Start loading of $it") + with(it) { + setupBotPlugin(koin) + } + }.onFailure { e -> + logger.log(Level.WARNING, "Unable to load bot part of $it", e) + }.onSuccess { + logger.info("Complete loading of $it") } - }.onFailure { e -> - logger.log(Level.WARNING, "Unable to load bot part of $it", e) } - } + }.joinAll() } /** diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 48b2b7f..5d36f5d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,8 +4,8 @@ kt = "1.6.21" kt-serialization = "1.3.3" kt-coroutines = "1.6.1" -microutils = "0.10.4" -tgbotapi = "1.1.0" +microutils = "0.10.5" +tgbotapi = "1.1.3" jb-exposed = "0.38.2" jb-dokka = "1.6.21" From 394ac02389d212f564ed3f3edc9f84d9b066722c Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 22 May 2022 11:47:36 +0600 Subject: [PATCH 3/4] start 1.1.0 and update tgbotapi --- CHANGELOG.md | 4 ++-- gradle/libs.versions.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba30dd5..d54ee28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # Changelog -## 1.0.1 +## 1.1.0 * `Versions` - * `tgbotapi`: `1.1.3` + * `tgbotapi`: `2.0.0` * `microutils`: `0.10.5` * `Plugin`: * All plugins will be loaded in parallel diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5d36f5d..5488d5e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ kt-serialization = "1.3.3" kt-coroutines = "1.6.1" microutils = "0.10.5" -tgbotapi = "1.1.3" +tgbotapi = "2.0.0" jb-exposed = "0.38.2" jb-dokka = "1.6.21" From 1cd9e6132c834d7c1df0bd9861aef8940e179432 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 22 May 2022 11:55:02 +0600 Subject: [PATCH 4/4] change version in properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 73954b8..b612185 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ kotlin.js.generate.externals=true kotlin.incremental=true group=dev.inmo -version=1.0.1 +version=1.1.0