#1480 as-an-operator-the-backfilltransactions-operation-will-upser#1481
Merged
chrisjsimpson merged 4 commits intomasterfrom Nov 9, 2025
Merged
Conversation
Updated `backfill_transactions()` in `subscribie/utils.py` to create missing Transaction records from Stripe PaymentIntents, not just update existing ones. Changes to `subscribie/utils.py`: - Create new Transaction records when PaymentIntent exists in Stripe but not locally - Link transactions to subscriptions via invoice lookup - Link transactions to persons via subscription or metadata (person_uuid) - Handle donation transactions from metadata (is_donation, donation_comment) - Process transactions in all payment statuses (not just succeeded) - Update all relevant fields (amount, currency, payment_status, created_at) - Log summary of created vs updated transaction counts Changes to `subscribie/blueprints/admin/__init__.py`: - Enhanced logging in `do_backfill_data()` background task - Add visible separator lines (===) for easy log identification - Add `sys.stdout.flush()` after each log to ensure immediate console output - Add full traceback logging on all errors - Add outer try-catch to capture fatal thread errors The upsert logic now matches `stripe_process_event_payment_intent_succeeded()` in `subscribie/blueprints/checkout/__init__.py` for consistency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
e6918a1 to
eaa4392
Compare
0536784 to
be7ea83
Compare
be7ea83 to
1c28323
Compare
Author
|
🚀 PR was released in |
Author
|
🚀 PR was released in |
1 similar comment
Author
|
🚀 PR was released in |
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.
Pull request related issue: #1480. Please pull these awesome changes in!