DB::table('mne.compatibility_controls')->where('capability', 'shadow')->first()); if (! $control || ! $control->enabled || (hexdec(substr(hash('sha256', $businessId), 0, 6)) % 100) >= $control->percentage) { return; } $connection = (string) config('existing-business.shadow_queue', 'database'); if (config('queue.connections.'.$connection.'.driver') !== 'database') { Log::info('mne.compatibility.shadow', ['outcome' => 'async_queue_required']); return; } CompareMneBusiness::dispatch($businessId)->onConnection($connection)->onQueue('mne-shadow')->afterCommit(); } catch (\Throwable) { Log::info('mne.compatibility.shadow', ['outcome' => 'dispatch_error']); } } }