mentorenwahl/docker/backend/src/backend/run.cr
Dominic Grimm 0e742965cc
All checks were successful
continuous-integration/drone/push Build is passing
Added frontend
2022-01-29 16:40:39 +01:00

23 lines
382 B
Crystal

module Backend
extend self
def run : Nil
Log.info { "Starting backend services..." }
channel = Channel(Nil).new(SERVICES.size)
SERVICES.each do |service|
spawn do
service.call
channel.send(nil)
end
end
SERVICES.size.times do
channel.receive
end
Fiber.yield
Log.info { "Backend services started." }
end
end