]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5686 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Jan 2023 05:45:12 +0000 (06:45 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 18 Jan 2023 05:45:12 +0000 (06:45 +0100)
app/Console/Kernel.php
app/Fluidbook/Farm.php
app/Slack/Slack.php
scripts/restartworkers.bat

index 3517b01cc4c8e67c6d96d1b974e6822d9761b241..d29a03397421ce7e0f42d5b20b698f6ef0f6461f 100644 (file)
@@ -24,14 +24,18 @@ class Kernel extends \Cubist\Backpack\Console\Kernel
      */
     protected function schedule(Schedule $schedule)
     {
-        parent::schedule($schedule);
+        $schedule->command('queue:prune-failed --hours=24')->daily()->at('03:50');
+        $schedule->command('job:dispatch Maintenance\\\\CleanDownloads')->dailyAt('4:00');
+        // $schedule->command('backup:clean')->daily()->at('04:00');
+        // $schedule->command('backup:run')->daily()->at('05:00');
+
+        $schedule->command('ws:migrate --publications=v2 --documents=missing')->dailyAt('1:00');
 
-        $schedule->command('cubist:magic:precache')->everyFiveMinutes();
         $schedule->command('job:dispatch ProcessTotals')->everyTwoHours();
-        $schedule->command('job:dispatch Maintenance\\CleanDownloads')->dailyAt('4:00');
-        $schedule->command('fluidbook:farm:ping')->everyMinute();
         $schedule->command('fluidbook:player:updatesources')->everyTwoHours();
-        $schedule->command('ws:migrate --publications=v2 --documents=missing')->dailyAt('1:00');
+
+        $schedule->command('fluidbook:farm:ping')->everyMinute();
+        $schedule->command('cubist:magic:precache')->everyFiveMinutes();
     }
 
     /**
index 7a84a9a9507da28d70d79757600c99436746eb0e..2f72467c4a7ab82919d79fb7eff55a45b40c1c66 100644 (file)
@@ -6,7 +6,6 @@ use Cubist\Util\Files\Files;
 use hollodotme\FastCGI\Client;
 use hollodotme\FastCGI\Requests\PostRequest;
 use hollodotme\FastCGI\SocketConnections\NetworkSocket;
-use function App\Util\is_countable;
 
 class Farm
 {
@@ -100,7 +99,7 @@ class Farm
 
         error_log($log);
 
-        return str_replace('/fluidbook/docs/','/protected/fluidbookpublication/docs/',$res);
+        return str_replace('/fluidbook/docs/', '/protected/fluidbookpublication/docs/', $res);
     }
 
     public static function ping($echo = true, $force = false)
@@ -146,3 +145,5 @@ class Farm
         file_put_contents(self::_serversCache(), json_encode($servers));
     }
 }
+
+
index 8d7c95e5887648f18cd1ac4806935f46baa7b745..574efd7da56b7d39e53961373da01ab55162425d 100644 (file)
@@ -57,6 +57,9 @@ class Slack
             $actionsText = '';
             $i = 0;
             foreach ($actions as $label => $data) {
+                if (is_null($data)) {
+                    $data = ['url' => '#nourl'];
+                }
                 if (is_string($data)) {
                     $data = ['url' => $data];
                 }
@@ -106,6 +109,7 @@ class Slack
                 return $response->getTs();
             }
         } catch (\Exception $e) {
+            Log::critical($e);
             Log::critical($e->getMessage() . ' // ' . $from . ' // ' . $channel . ' // ' . $text . ' // ' . $blocks);
         }
         return false;
index 9f771008000267a6983bca465a77b405551dab39..454106dc7de6ec927f6697e40d3c3f9a2f4ce138 100644 (file)
@@ -3,3 +3,5 @@ cls
 C:\tools\cygwin\bin\ssh.exe -t root@toolbox.fluidbook.com 'docker exec -it -u toolbox fluidbook-toolbox /application/scripts/restartworkers'
 exit
 exit
+exit
+