Compare commits

..

2 Commits

Author SHA1 Message Date
Christoph Hagen
1c57b538be Display environment on startup 2023-12-19 20:45:16 +01:00
Christoph Hagen
5138bb543e Ignore more files 2023-12-19 20:45:02 +01:00
3 changed files with 12 additions and 10 deletions

13
.gitignore vendored
View File

@ -8,12 +8,11 @@
.DS_Store
Package.resolved
.swiftpm/
Public/caps.json
Public/changes.txt
Public/classifier.*
Public/count.*
Public/images/
Public/thumbnails/
Public/classifier.version
Public/classifier.mlmodel
Public/caps.json
Training/backup/
Training/config.json
Public/thumbnails
Public/count.js
Resources/config.json
Resources/logs/

View File

@ -5,6 +5,9 @@ import NIOCore
extension MultiThreadedEventLoopGroup: AsyncScheduler {
func test() {
}
public func schedule(asyncJob: @escaping @Sendable () async throws -> Void) {
_ = any().makeFutureWithTask(asyncJob)
}

View File

@ -58,12 +58,12 @@ func configure(_ app: Application) async throws {
} else {
try await serverStatus.update(.reducedFunctionality)
}
print("[\(df.string(from: Date()))] Server started (\(server.capCount) caps)")
print("[\(df.string(from: Date()))] Server started (\(app.environment.name), \(server.capCount) caps)")
}
func shutdown() {
Task {
print("[\(df.string(from: Date()))] Server shutdown")
asyncScheduler.schedule {
do {
try await asyncScheduler.shutdownGracefully()
} catch {