deca81c2d7
CsvReconcileJob — hourly резерв-канал приёма лидов через CSV-экспорт поставщика: - Cache::lock 600s (overlap protection). - Окно [now-25h, now] (запас 1ч над hourly cron). - INSERT supplier_csv_reconcile_log status='running' → 'ok' | 'drift_alert' | 'failed'. - Missing vids → INSERT supplier_leads (platform extracted из project, source='csv_recovery', recovered_from_csv_at=now) + dispatch RouteSupplierLeadJob. - Drift > 5% → CsvDriftAlertMail на services.supplier.alert_email. - UNIQUE-vid conflict → log + skip (idempotency). - На SupplierTransientException/любой Throwable → status='failed', error_message, rethrow. CsvDriftAlertMail + blade-template emails/csv_drift_alert. routes/console.php — Schedule::job(new CsvReconcileJob)->hourly(). config/services.php — supplier.alert_email default 'ops@liderra.ru'. 6 integration tests (CsvReconcileJobTest) + Schedule registration test (через Http::fake + Bus::fake + Mail::fake + SharesSupplierPdo trait для cross-connection). Parallel-test race fix: putSupplierSession() вызывается прямо перед SUT, потому что Sync/Cleanup tests'ы в afterEach делают forget('supplier:session'), а в --parallel режиме воркеры делят Redis DB+prefix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Third Party Services
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This file is for storing the credentials for third party services such
|
|
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
|
| location for this type of information, allowing packages to have
|
|
| a conventional file to locate the various service credentials.
|
|
|
|
|
*/
|
|
|
|
'postmark' => [
|
|
'key' => env('POSTMARK_API_KEY'),
|
|
],
|
|
|
|
'resend' => [
|
|
'key' => env('RESEND_API_KEY'),
|
|
],
|
|
|
|
'ses' => [
|
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
|
],
|
|
|
|
'slack' => [
|
|
'notifications' => [
|
|
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
|
],
|
|
],
|
|
|
|
'supplier' => [
|
|
'login' => env('SUPPLIER_LOGIN'),
|
|
'password' => env('SUPPLIER_PASSWORD'),
|
|
'portal_url' => env('SUPPLIER_PORTAL_URL', 'https://crm.bp-gr.ru'),
|
|
'alert_email' => env('SUPPLIER_ALERT_EMAIL', 'ops@liderra.ru'),
|
|
],
|
|
|
|
];
|