Merge branch 'v4-next' into notifications
This commit is contained in:
@@ -60,7 +60,7 @@ class SyncBunny extends Command
|
||||
];
|
||||
return PendingRequest::withHeaders($headers)->post('https://api.bunny.net/purge', [
|
||||
"urls" => [$url],
|
||||
]);
|
||||
])->throw();
|
||||
});
|
||||
try {
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
@@ -72,18 +72,14 @@ class SyncBunny extends Command
|
||||
$pool->storage(file: "$parent_dir/scripts/$docker_install_script")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$docker_install_script"),
|
||||
$pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$versions"),
|
||||
]);
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$compose_file_prod"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$production_env"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$upgrade_script"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$install_script"),
|
||||
$pool->purge(url: "$bunny_cdn/$bunny_cdn_path/$docker_install_script"),
|
||||
$pool->purge(url: "$bunny_cdn/$versions"),
|
||||
]);
|
||||
Http::withHeaders([
|
||||
'AccessKey' => env('BUNNY_API_KEY'),
|
||||
'Accept' => 'application/json',
|
||||
])->get('https://api.bunny.net/purge', [
|
||||
"url" => "$bunny_cdn/$bunny_cdn_path/*",
|
||||
"async" => false
|
||||
])->throw();
|
||||
echo "All files uploaded & purged...\n";
|
||||
return;
|
||||
throw new \Exception("Something went wrong.");
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Jobs\ContainerStatusJob;
|
||||
use App\Jobs\DockerCleanupDanglingImagesJob;
|
||||
use App\Jobs\ProxyCheckJob;
|
||||
use App\Jobs\InstanceAutoUpdateJob;
|
||||
use App\Jobs\InstanceProxyCheckJob;
|
||||
use App\Jobs\InstanceDockerCleanupJob;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
@@ -15,9 +15,11 @@ class Kernel extends ConsoleKernel
|
||||
*/
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
$schedule->job(new ContainerStatusJob)->everyMinute();
|
||||
$schedule->job(new DockerCleanupDanglingImagesJob)->everyMinute();
|
||||
// $schedule->job(new ProxyCheckJob)->everyMinute();
|
||||
$schedule->command('horizon:snapshot')->everyFiveMinutes();
|
||||
|
||||
$schedule->job(new InstanceDockerCleanupJob)->everyFiveMinutes();
|
||||
$schedule->job(new InstanceAutoUpdateJob)->everyFifteenMinutes();
|
||||
// $schedule->job(new InstanceProxyCheckJob)->everyMinute();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user