Skip Queue HTTP entirely during Care demo seed.
Deploy Ladill Care / deploy (push) Successful in 1m33s
Deploy Ladill Care / deploy (push) Successful in 1m33s
Enterprise reseeds were blocked for minutes on queue.ladill.com calls; local specialty data still seeds, and Queue tickets can backfill on first visit. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -173,39 +173,10 @@ class DemoTenantSeeder
|
||||
*/
|
||||
private function syncQueueTicketsForDemo(Organization $organization, array $branches): void
|
||||
{
|
||||
if (! data_get($organization->settings, 'queue_integration_enabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$bridge = app(CareQueueBridge::class);
|
||||
if (! $bridge->isEnabled($organization)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Core contexts only — specialty ticket backfill is best-effort and
|
||||
// expensive (branch × module × Queue HTTP). Specialty pages still show
|
||||
// Care-side waiting appointments from seedSpecialtyDemoData().
|
||||
$contexts = [
|
||||
CareQueueContexts::CONSULTATION,
|
||||
CareQueueContexts::PHARMACY,
|
||||
CareQueueContexts::LABORATORY,
|
||||
CareQueueContexts::BILLING,
|
||||
CareQueueContexts::IMAGING,
|
||||
];
|
||||
|
||||
foreach ($branches as $branch) {
|
||||
foreach ($contexts as $context) {
|
||||
try {
|
||||
$bridge->syncMissingTickets($organization, $context, (int) $branch->id, 25);
|
||||
} catch (\Throwable) {
|
||||
// Continue other contexts/branches if one Queue call fails.
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (\Throwable) {
|
||||
// Demo seed should not fail if Queue API is unreachable.
|
||||
}
|
||||
// Intentionally no-op during demo seed. Queue HTTP (branch × context) can
|
||||
// take many minutes on Enterprise volumes and hung production reseeds.
|
||||
// Specialty/care waiting lists still come from local appointments; Queue
|
||||
// tickets backfill lazily on first Ops / specialty page visit.
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -603,12 +574,7 @@ class DemoTenantSeeder
|
||||
$settings = $organization->settings ?? [];
|
||||
data_set($settings, 'queue_integration_enabled', true);
|
||||
$organization->update(['settings' => $settings]);
|
||||
|
||||
try {
|
||||
app(CareQueueProvisioner::class)->provisionOrganization($organization->fresh());
|
||||
} catch (\Throwable) {
|
||||
// Best-effort department/specialty queue stubs for Pro demo ticket flow.
|
||||
}
|
||||
// Skip CareQueueProvisioner here — same Queue HTTP storm as ticket sync.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user