yay for spelling

This commit is contained in:
akp 2024-05-18 14:34:44 +01:00
parent 5f0d01e18f
commit a686f341c8
No known key found for this signature in database
GPG key ID: CF8D58F3DEB20755

View file

@ -87,9 +87,9 @@ func (hs *httpServer) newJourney(ctx *fiber.Ctx) error {
func (hs *httpServer) processNewJourney(requestBody *newJourneyRequest, locations, services []string, processID uuid.UUID, output chan *util.SSEItem) {
defer func() {
// In some cases, if we have a simple journey to process (eg. one with a predefined length that needs no
// external API calls), it can be processed, inserted and the steam cleaned up before the client has the time to
// roundtrip and make that initial request. This then means the client gets a 404 when requesting the stream and
// just does nothing. Adding a delay here prevents that 404.
// external API calls), it can be processed, inserted and the stream cleaned up before the client has the time
// to roundtrip and make that initial request. This then means the client gets a 404 when requesting the stream
// and just does nothing. Adding a delay here prevents that 404.
go func() {
time.Sleep(time.Second * 10)
hs.cleanupProcessor(processID)