mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
remove BaseRequestsExecutor scope
This commit is contained in:
parent
58684ee57e
commit
d7a77085b5
@ -48,3 +48,4 @@
|
|||||||
* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in
|
* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in
|
||||||
`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package
|
`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package
|
||||||
* Replace `ProxySettings` data class in `settings` package, deprecate old link
|
* Replace `ProxySettings` data class in `settings` package, deprecate old link
|
||||||
|
* `BaseRequestsExecutor` now have no it's own scope
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.bot
|
package com.github.insanusmokrassar.TelegramBotAPI.bot
|
||||||
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.asCoroutineDispatcher
|
|
||||||
import java.util.concurrent.Executors
|
|
||||||
|
|
||||||
abstract class BaseRequestsExecutor(
|
abstract class BaseRequestsExecutor(
|
||||||
token: String,
|
token: String,
|
||||||
hostUrl: String = "https://api.telegram.org"
|
hostUrl: String = "https://api.telegram.org"
|
||||||
) : RequestsExecutor {
|
) : RequestsExecutor {
|
||||||
protected val baseUrl: String = "$hostUrl/bot$token"
|
protected val baseUrl: String = "$hostUrl/bot$token"
|
||||||
|
|
||||||
protected val scope: CoroutineScope = CoroutineScope(
|
|
||||||
Executors.newSingleThreadExecutor().asCoroutineDispatcher()
|
|
||||||
)
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user