Skip to content
Snippets Groups Projects
Unverified Commit 9b518323 authored by Maxime FRIESS's avatar Maxime FRIESS :blue_heart:
Browse files

Merge tag '1.1.1' into develop

1.1.1
parents 314d4eae 3535ece7
Branches
Tags
No related merge requests found
Pipeline #105682 failed with stage
in 54 seconds
......@@ -57,4 +57,4 @@ RUN echo "* * * * * cd /api && php artisan schedule:run >> /dev/null 2>&1" | cro
# Export port 9000 and start php artisan serve
EXPOSE 8000
CMD php artisan serve --host=0.0.0.0 --port=8000
CMD php artisan schedule:work & php artisan migrate --force && php artisan l5-swagger:generate && php artisan serve --host 0.0.0.0
......@@ -34,7 +34,7 @@ public function handle()
{
// We grab the server that are marked online but didn't do a heartbeat in the last two minutes.
// This happens when a server crashes or goes offline.
Server::where("online", true)->whereTime('last_heartbeat_at', '<', Carbon::now()->subSeconds(120))->lazyById()->each(function ($server) {
Server::where("online", true)->where('last_heartbeat_at', '<', Carbon::now()->subSeconds(120)->toDateTimeString())->lazyById()->each(function ($server) {
// We fetch all the users connected to the server and mark them as disconnected.
// NOTE: The users will have to wait at least one minute and at most three minutes
// since the server crashes before connecting to another server.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment