Skip to content

feat: task billing log add data export#3396

Open
feitianbubu wants to merge 1 commit intoQuantumNous:mainfrom
feitianbubu:pr/b9631ad6fd746f43e4de4401617f3cdb0fe5b481
Open

feat: task billing log add data export#3396
feitianbubu wants to merge 1 commit intoQuantumNous:mainfrom
feitianbubu:pr/b9631ad6fd746f43e4de4401617f3cdb0fe5b481

Conversation

@feitianbubu
Copy link
Contributor

@feitianbubu feitianbubu commented Mar 23, 2026

修复任务补扣和退款没有统计到数据看板上的问题

Summary by CodeRabbit

  • Chores
    • Enhanced asynchronous quota tracking infrastructure for billing systems when the export feature is enabled.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: adb06738-195b-44d4-85b7-d608261f5472

📥 Commits

Reviewing files that changed from the base of the PR and between deff59a and 1a03099.

📒 Files selected for processing (1)
  • model/log.go

Walkthrough

Added conditional asynchronous quota export functionality to task billing logging. When enabled, quota values are computed and negated for refund operations, then scheduled for export via a goroutine pool without affecting existing database logging.

Changes

Cohort / File(s) Summary
Quota Export Enhancement
model/log.go
Integrated conditional async quota export in RecordTaskBillingLog that triggers when DataExportEnabled is active, computing and negating quota for refunds before scheduling export via gopool.Go.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A quota hops through the export tunnel,
Refunds get flipped with a logical funnel,
Async it goes to the pool with a spring,
Data flows free—what a beautiful thing!
No DB logs stumble, all logs stay intact, ✨
One simple change that's beautifully backed.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: task billing log add data export' accurately describes the main change in the pull request, which adds conditional asynchronous quota export functionality to the task billing log.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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