Skip to content

Commit

Permalink
Using the main scheduler leads to a deadlock (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcrodrigues authored Nov 4, 2019
1 parent 121e6a4 commit 7edb5bc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Sources/App/configure.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Bot
import Vapor
import ReactiveSwift

enum ConfigurationError: Error {
case missingConfiguration(message: String)
Expand All @@ -10,10 +9,7 @@ enum ConfigurationError: Error {
public func configure(_ config: inout Config, _ env: inout Environment, _ services: inout Services) throws {

let logger = PrintLogger()
let gitHubEventsService = GitHubEventsService(
signatureToken: try Environment.gitHubWebhookSecret(),
scheduler: QueueScheduler.main
)
let gitHubEventsService = GitHubEventsService(signatureToken: try Environment.gitHubWebhookSecret())

logger.log("👟 Starting up...")

Expand Down Expand Up @@ -48,8 +44,7 @@ private func makeMergeService(with logger: LoggerProtocol, _ gitHubEventsService
topPriorityLabels: try Environment.topPriorityLabels(),
logger: logger,
gitHubAPI: gitHubAPI,
gitHubEvents: gitHubEventsService,
scheduler: QueueScheduler.main
gitHubEvents: gitHubEventsService
)
}

Expand Down

0 comments on commit 7edb5bc

Please sign in to comment.