Skip to content

fix: restore build health for scheduler workers and legacy cmd#15

Open
dudedani wants to merge 1 commit into
Lineblocs:masterfrom
dudedani:fix/build-green-baseline
Open

fix: restore build health for scheduler workers and legacy cmd#15
dudedani wants to merge 1 commit into
Lineblocs:masterfrom
dudedani:fix/build-green-baseline

Conversation

@dudedani
Copy link
Copy Markdown

@dudedani dudedani commented Mar 5, 2026

This pull request refactors the ChargeCustomer method in the payment repository to return both a result and an error, and updates all related usages and tests to match the new signature. It also improves type consistency for service plan identifiers and fixes a few minor issues in background jobs and worker code. The most important changes are grouped below:

Payment Repository API Refactor

  • Changed the signature of ChargeCustomer in PaymentRepository to return (*billing.ChargeResult, error) instead of just error, updating all usages in billing jobs and tests accordingly. This enables callers to access additional details about the charge operation and improves error handling.

Service Plan Key Consistency

  • Standardized the identifier for service plans from Name to KeyName in both annual and monthly billing tests, improving clarity and consistency in plan references.

Type and Comparison Fixes

  • Fixed type mismatches by converting integer values to floats for correct comparisons in background email triggers and monthly billing logic, preventing subtle bugs in payment threshold checks.

Worker and Storage Improvements

  • Improved error handling in billing and recordings workers by checking for JSON unmarshal errors and AMQP consume errors, logging issues, and dropping malformed messages to avoid crashes.

Minor Test Query Fixes

  • Fixed SQL query formatting in monthly billing tests to match the expected number of parameters, reducing test failures due to query mismatches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant