Add OrderQueueService for real-time wait time estimation#25
Draft
Add OrderQueueService for real-time wait time estimation#25
Conversation
Owner
|
@copilot after I delegate to the cloud, I do not want updates in chat. How to turn this off? |
…wait times Co-authored-by: PagelsR <4490855+PagelsR@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add order queue implementation for tracking order preparation times
Add OrderQueueService for real-time wait time estimation
Mar 13, 2026
Author
To stop receiving in-chat update notifications after delegating to the Copilot coding agent, you can mute notifications for the PR:
Alternatively, to reduce GitHub notification emails globally, go to GitHub Settings → Notifications and adjust your preferences for pull request activity. There is currently no way to prevent the agent from posting progress comments to the PR itself — that's how it communicates status — but muting the PR notifications means you won't be pinged for each update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an in-memory order queue to the backend so store management can track active orders and customers can see estimated wait times based on current order volume and historical preparation data.
New Components
OrderQueueEntrymodel — tracksOrderId,EnqueuedAt,CompletedAt,Status(Pending/Completed), and computesPreparationTimeMinutesOrderQueueService(singleton) — thread-safe in-memory queue; retains up to 100 completed entries for rolling average calculation; defaults to 5-minute prep time when no history existsOrderQueueController— four new endpoints:GET/api/orderqueue/statusGET/api/orderqueue/averagetimeGET/api/orderqueuePOST/api/orderqueue/{orderId}/completeModified
OrderService.CreateOrderAsync— automatically enqueues every new order after DB saveProgram.cs— registersOrderQueueServiceas a singletonExample Response —
GET /api/orderqueue/status{ "pendingOrderCount": 3, "averagePreparationTimeMinutes": 4.7, "estimatedWaitMinutes": 14.1 }Estimated wait is
pendingCount × avgPrepTime— appropriate for a single-station preparation model.Original prompt
Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.