fix: supported preconcurrency of swift methods sdk
This commit is contained in:
parent
77672b5c2a
commit
a11d671942
4 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
import Vapor
|
||||
import SwiftTelegramSdk
|
||||
@preconcurrency import SwiftTelegramSdk
|
||||
|
||||
final class DefaultBotHandlers {
|
||||
static func addHandlers() async {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import SwiftTelegramSdk
|
||||
@preconcurrency import SwiftTelegramSdk
|
||||
|
||||
actor TGBotActor {
|
||||
private var _bot: TGBot!
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import Vapor
|
||||
import SwiftTelegramSdk
|
||||
@preconcurrency import SwiftTelegramSdk
|
||||
|
||||
public func configure(_ app: Application) async throws {
|
||||
guard let tgApi: String = Environment.get("TG_BOT_API") else { throw Errors.notVariable("Telegram key is not defined")}
|
||||
|
|
|
@ -12,7 +12,6 @@ let app: Application = try await Application.make(env, Application.EventLoopGrou
|
|||
|
||||
let botActor: TGBotActor = .init()
|
||||
|
||||
defer { app.shutdown() }
|
||||
|
||||
try await configure(app)
|
||||
try await app.execute()
|
||||
try await app.asyncShutdown()
|
||||
|
|
Loading…
Reference in a new issue