feat: fleet arrival queue (rebase of #1413 onto main)#1508
Closed
tiweb442 wants to merge 14 commits into
Closed
Conversation
…ing, scheduler fallback - Add time_arrival_ms (bigint) to fleet_missions for sub-second ordering - Dispatch a delayed ProcessFleetArrival job at fleet send via FleetMissionObserver - Serialize same-destination processing with Cache::lock; different destinations run concurrently - Order same-destination arrivals by time_arrival / time_arrival_ms / id - ACS Defend gets a second hold_job_id job firing at physical arrival time - Cancel pending jobs on recall by tracking arrival_job_id / hold_job_id on the mission - Add ProcessFleetArrivals scheduler command (every minute) as fallback after downtime - Reuse existing DB queue jobs in syncMissionArrivalJobs when timing is unchanged - Assert database queue driver at boot; other drivers cannot track job IDs for cancellation - Wrap processDueMissionEventsForMission in DB::transaction for atomic batch rollback - Fix migration missing trailing semicolon on anonymous class
…iDefenderBattleTest
Raise ProcessFleetArrival timeout and destination lock TTL to 600s so large battles are not killed mid-lock, allow more lock-contention retries, and poll the queue every 0.5s for snappier delayed arrivals. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 20, 2026
Preview deployment
Preview environment has been cleaned up. |
Collaborator
|
I have pushed a number of changes to my branch, which this PR is based on. Closing in favor of #1413. |
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.
Summary
This is a clean rebase/merge of #1413 onto current
main, plus a small hardening commit. Credit for the feature work belongs to @Geda173.#1413 implements real-time fleet arrival processing for #363 and supersedes the stalled Redis approach in #817. It was ~19 commits behind
main; this branch merges cleanly with no conflicts.Included on top of #1413
ProcessFleetArrivaltimeout and destination lock TTL to 600stries10)--sleep=0.5 --timeout=600for snappier delayed arrivalsSee also hardening PR against Geda173's branch: Geda173#68
Smoke test results (local Docker, this branch)
FleetArrivalQueueTestFleetDispatchMultiDefenderBattleTestadd_fleet_arrival_queue_fields...ogamex:scheduler:process-fleet-arrivalsRelated
Test plan
fleet-arrivalsqueue after deployMade with Cursor