Fix: Add timeout to discover_ad_units to prevent stuck syncs#624
Merged
EmmaLouise2018 merged 1 commit intomainfrom Oct 25, 2025
Merged
Fix: Add timeout to discover_ad_units to prevent stuck syncs#624EmmaLouise2018 merged 1 commit intomainfrom
EmmaLouise2018 merged 1 commit intomainfrom
Conversation
b1dea87 to
7abc14f
Compare
The discover_ad_units() method was missing a @timeout decorator, causing inventory syncs to hang indefinitely at 'Discovering Ad Units (1/6)' if the GAM API became unresponsive. All other discovery methods (placements, labels, custom_targeting) already had 600-second timeouts. This adds the same 600-second timeout to ad units discovery for consistency. This fixes the issue where users see 'Sync in progress...' stuck at phase 1 and need to click 'Reset Stuck Sync' to recover.
7abc14f to
56457ad
Compare
danf-newton
pushed a commit
to Newton-Research-Inc/salesagent
that referenced
this pull request
Nov 24, 2025
Fix: Add timeout to discover_ad_units to prevent stuck syncs
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.
The discover_ad_units() method was missing a @timeout decorator, causing inventory syncs to hang indefinitely at 'Discovering Ad Units (1/6)' if the GAM API became unresponsive.
All other discovery methods (placements, labels, custom_targeting) already had 600-second timeouts. This adds the same 600-second timeout to ad units discovery for consistency.
This fixes the issue where users see 'Sync in progress...' stuck at phase 1 and need to click 'Reset Stuck Sync' to recover.