feat: 26&timeout&keystore

This commit is contained in:
hashbro
2026-09-24 03:00:57 +08:00
parent f9fd356679
commit cc66811dbd
18 changed files with 303 additions and 16 deletions
+9
View File
@@ -9,6 +9,7 @@ use App\Services\Ocr\TesseractOcrDriver;
use App\Services\SettingsService;
use App\Telegram\TelegramBotContext;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
use Nutgram\Laravel\RunningMode\LaravelWebhook;
@@ -44,6 +45,14 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
// Floor for outbound calls that don't set their own timeout. Explicit
// Http::timeout() still wins. 120s leaves room for slow uploads;
// connect fails fast enough that a dead host doesn't sit for the full window.
Http::globalOptions([
'connect_timeout' => 20,
'timeout' => 120,
]);
if (! $this->app->runningInConsole()) {
$limit = (int) ini_get('max_execution_time');
if ($limit > 0 && $limit < 60) {