Skip to content

feat: [#651] Add DB driver for Queue module#1047

Merged
hwbrzzl merged 6 commits intomasterfrom
bowen/#651
May 28, 2025
Merged

feat: [#651] Add DB driver for Queue module#1047
hwbrzzl merged 6 commits intomasterfrom
bowen/#651

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented May 25, 2025

📑 Description

Closes goravel/goravel#651

image

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented May 27, 2025

Codecov Report

Attention: Patch coverage is 76.57658% with 52 lines in your changes missing coverage. Please review.

Project coverage is 71.07%. Comparing base (fe01698) to head (22e59ed).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
queue/driver_database.go 73.97% 14 Missing and 5 partials ⚠️
queue/application.go 20.00% 16 Missing ⚠️
queue/worker.go 60.60% 9 Missing and 4 partials ⚠️
queue/driver_sync.go 57.14% 2 Missing and 1 partial ⚠️
queue/service_provider.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1047      +/-   ##
==========================================
+ Coverage   70.54%   71.07%   +0.53%     
==========================================
  Files         176      178       +2     
  Lines       12330    12446     +116     
==========================================
+ Hits         8698     8846     +148     
+ Misses       3252     3211      -41     
- Partials      380      389       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Driver(connection string) string
FailedDatabase() string
FailedTable() string
QueueKey(connection, queue string) string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different drivers have different queue keys, so it should be decided by the drivers.

@hwbrzzl hwbrzzl marked this pull request as ready for review May 27, 2025 04:26
@hwbrzzl hwbrzzl requested a review from a team as a code owner May 27, 2025 04:26
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 0421088 Previous: 727d072 Ratio
BenchmarkFile_ReadWrite 355723 ns/op 6185 B/op 97 allocs/op 203132 ns/op 6186 B/op 97 allocs/op 1.75
BenchmarkFile_ReadWrite - ns/op 355723 ns/op 203132 ns/op 1.75

This comment was automatically generated by workflow using github-action-benchmark.

Comment on lines +71 to +72
if err != nil {
panic(err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it appropriate to use panic here?

Copy link
Contributor Author

@hwbrzzl hwbrzzl May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we want to keep the fluent flow: facades.Queue().Worker().Run()

Copy link
Member

@devhaozi devhaozi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hwbrzzl hwbrzzl merged commit 28d87a5 into master May 28, 2025
15 checks passed
@hwbrzzl hwbrzzl deleted the bowen/#651 branch May 28, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DB driver for Queue module

2 participants