Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refactor queue module #314

Open
wants to merge 103 commits into
base: master
Choose a base branch
from
Open

feat: refactor queue module #314

wants to merge 103 commits into from

Conversation

devhaozi
Copy link
Member

@devhaozi devhaozi commented Oct 7, 2023

Closes goravel/goravel#153
Closes goravel/goravel#278

📑 Description

This is a draft, need more discussion.

I tried to reconstruct the queue module with reference to Laravel's implementation. There are some issues that need to be discussed and determined.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

Summary by CodeRabbit

  • New Features

    • Introduced interface Driver for managing job queues with methods for pushing, popping, and scheduling jobs.
    • Added MigrateMakeCommand struct for creating migrations for failed queue jobs.
    • Implemented Shutdown method for the Worker to allow graceful shutdown.
    • Enhanced queue configuration with new methods like Via() and FailedJobsQuery().
  • Bug Fixes

    • Improved error handling in multiple methods across the application, including Register and Boot.
    • Standardized import statements and references for consistency.
  • Refactor

    • Updated structs and method signatures across various files to use more generic types and new field names.
    • Replaced machinery with driver in Worker and Task structs for better integration.
    • Modified SQL statements for database consistency.
  • Tests

    • Adjusted test cases to reflect new configurations and updated struct fields.
    • Simplified argument passing mechanisms within the test functions.
  • Documentation

    • Updated references in import statements for clarity and consistency.
    • Revised comments to reflect new method signatures and struct fields.

contracts/queue/driver.go Outdated Show resolved Hide resolved
contracts/queue/task.go Outdated Show resolved Hide resolved
queue/config.go Outdated Show resolved Hide resolved
queue/driver/database.go Outdated Show resolved Hide resolved
@devhaozi
Copy link
Member Author

devhaozi commented Oct 7, 2023

cc @hwbrzzl

@devhaozi devhaozi marked this pull request as draft October 7, 2023 18:46
queue/job.go Outdated Show resolved Hide resolved
queue/models/Job.go Outdated Show resolved Hide resolved
@devhaozi devhaozi changed the title draft: refactor queue module feat: refactor queue module Oct 9, 2023
queue/driver_database.go Outdated Show resolved Hide resolved
@devhaozi
Copy link
Member Author

devhaozi commented Oct 9, 2023

@hwbrzzl Please help me check if there are any problems with the implementation idea. If there are no problems, I will continue to complete other driver development.

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

Great 👍

queue/driver_database.go Outdated Show resolved Hide resolved
queue/machinery.go Outdated Show resolved Hide resolved
queue/migrations/00000000000000_create_jobs_table.up.sql Outdated Show resolved Hide resolved
queue/driver.go Show resolved Hide resolved
Copy link

coderabbitai bot commented Jul 10, 2024

Important

Review skipped

Auto reviews are limited to specific labels.

Labels to auto review (1)
  • 🚀 Review Ready

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes focus on enhancing the queue system by introducing new methods and modifying existing ones, refining job handling, improving error handling, and expanding the trigger events in the GitHub workflow. Additionally, significant updates to dependencies and database migration stubs were made to ensure consistency and support for asynchronous job processing.

Changes

File(s) Change Summary
.github/workflows/pr-check-title.yml Switched trigger from pull_request to pull_request_target and refined event triggers.
contracts/queue/driver.go Introduced Driver interface with methods for job queue management.
contracts/queue/job.go Updated Jobs struct to include a Delay field.
contracts/queue/queue.go Modified Queue interface methods and added new ones, including GetJob and Shutdown.
contracts/queue/task.go Changed Delay method signature in Task interface from time.Time to uint.
database/console/migrate_stubs.go Modified SQL statements for consistency across database platforms.
event/application.go Added error handling in Register method of Application struct.
event/service_provider.go Renamed package eventConsole to eventconsole and updated references.
event/task.go Simplified conversion process from event.Arg to any type.
event/task_test.go Updated test function to use any type for job handling.
go.mod Updated dependencies, including removal of machinery and addition of do package.
mail/application.go Modified argument passing in Queue method to use any type.
mail/application_test.go Restructured test suite logic and configurations for mail and queue operations.
mail/service_provider.go Added error handling in Boot method of ServiceProvider struct.
queue/application.go Made changes to Application struct, including new methods and modifications to existing ones.
queue/config.go Updated methods in Config struct for queue configuration.
queue/config_test.go Modified configuration settings and test cases for queue connections.
queue/console/migrate_make_command.go Added MigrateMakeCommand struct for creating migration for failed queue jobs database table.
queue/driver_async.go Introduced functionality for asynchronous job processing.
queue/task.go Major changes to Task struct, including field types and method signatures.
queue/task_test.go Updated TestDispatchSync function to use JobImpl for job registration.
queue/utils_test.go Renamed import queuecontract to contractsqueue and updated references.
queue/worker.go Updated Worker struct fields and methods, including new Shutdown method and asynchronous job processing.

Assessment against Linked Issues

Objective Addressed Explanation
Refactor the queue facades (#153)
Implement async and sync job dispatch, Redis/Database/memory driver (#153)
Provide interfaces to get queue status (#153)
Fix queue always printing DEBUG messages with Redis driver (#278) Needs review to confirm if debug messages issue has been resolved.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Outside diff range, codebase verification and nitpick comments (3)
event/task.go (1)

Line range hint 19-62:
Consider adding error handling for event handling and listener dispatching.

The Dispatch method should handle potential errors from event handling and listener dispatching.

  handledArgs, err := receiver.event.Handle(receiver.args)
  if err != nil {
    return err
  }

  var mapArgs []any
  for _, arg := range handledArgs {
    mapArgs = append(mapArgs, arg.Value)
  }

  for _, listener := range receiver.listeners {
    var err error
    task := receiver.queue.Job(listener, eventArgsToQueueArgs(handledArgs))
    queue := listener.Queue(mapArgs...)
    if queue.Connection != "" {
      task.OnConnection(queue.Connection)
    }
    if queue.Queue != "" {
      task.OnQueue(queue.Queue)
    }
    if queue.Enable {
      err = task.Dispatch()
    } else {
      err = task.DispatchSync()
    }

    if err != nil {
      return err
    }
  }

  return nil
queue/worker.go (2)

12-18: Add documentation comments.

Consider adding documentation comments for each attribute to improve readability and maintainability.

type Worker struct {
	// concurrent is the number of concurrent workers.
	concurrent int
	// driver is the driver implementation for the worker.
	driver *DriverImpl
	// job is the job implementation for the worker.
	job *JobImpl
	// failedJobs is the query for failed jobs.
	failedJobs orm.Query
	// queue is the name of the queue.
	queue string
	// failedJobChan is the channel for failed jobs.
	failedJobChan chan FailedJob
	// isShutdown indicates if the worker is shutting down.
	isShutdown bool
}

57-63: Add documentation comments.

Consider adding documentation comments for each attribute to improve readability and maintainability.

type FailedJob struct {
	// Queue is the name of the queue.
	Queue string
	// Signature is the job signature.
	Signature string
	// Payloads are the job arguments.
	Payloads []any
	// Exception is the error message.
	Exception string
	// FailedAt is the timestamp of the failure.
	FailedAt carbon.DateTime
}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a522419 and 4069a4e.

Files ignored due to path filters (5)
  • go.sum is excluded by !**/*.sum
  • mocks/queue/Driver.go is excluded by !mocks/**
  • mocks/queue/Queue.go is excluded by !mocks/**
  • mocks/queue/Task.go is excluded by !mocks/**
  • mocks/queue/Worker.go is excluded by !mocks/**
Files selected for processing (31)
  • .github/workflows/pr-check-title.yml (1 hunks)
  • contracts/queue/driver.go (1 hunks)
  • contracts/queue/job.go (1 hunks)
  • contracts/queue/queue.go (2 hunks)
  • contracts/queue/task.go (1 hunks)
  • database/console/migrate_stubs.go (8 hunks)
  • event/application.go (1 hunks)
  • event/service_provider.go (2 hunks)
  • event/task.go (1 hunks)
  • event/task_test.go (3 hunks)
  • go.mod (6 hunks)
  • mail/application.go (1 hunks)
  • mail/application_test.go (8 hunks)
  • mail/service_provider.go (2 hunks)
  • queue/application.go (1 hunks)
  • queue/config.go (2 hunks)
  • queue/config_test.go (4 hunks)
  • queue/console/migrate_make_command.go (1 hunks)
  • queue/console/migrate_make_command_test.go (1 hunks)
  • queue/console/migrate_stubs.go (1 hunks)
  • queue/driver.go (1 hunks)
  • queue/driver_async.go (1 hunks)
  • queue/driver_async_test.go (1 hunks)
  • queue/driver_sync.go (1 hunks)
  • queue/driver_sync_test.go (1 hunks)
  • queue/job.go (1 hunks)
  • queue/service_provider.go (1 hunks)
  • queue/task.go (2 hunks)
  • queue/task_test.go (1 hunks)
  • queue/utils_test.go (2 hunks)
  • queue/worker.go (1 hunks)
Files skipped from review due to trivial changes (3)
  • .github/workflows/pr-check-title.yml
  • contracts/queue/task.go
  • queue/utils_test.go
Additional comments not posted (102)
contracts/queue/job.go (2)

11-13: Ensure Type Consistency and Proper Usage for Args Field

Changing Args from []Arg to []any increases flexibility but may introduce type safety issues. Ensure that all usages and validations handle the []any type correctly.


13-13: Confirm the Purpose and Usage of Delay Field

The Delay field is added to the Jobs struct. Ensure that this field is used correctly throughout the codebase and matches the intended delay functionality.

contracts/queue/queue.go (4)

4-4: Optimize Worker Method Parameter Type

The parameter type for the Worker method is changed to payloads ...*Args. This change can improve clarity and flexibility. Ensure that all calls to Worker handle the new parameter type correctly.


6-6: Register Method: Ensure Proper Job Registration

The Register method now takes a slice of Job as a parameter. Ensure that this method correctly registers the provided jobs and handles any potential errors.


9-12: New Methods: GetJobs, GetJob, and Job

The Queue interface now includes GetJobs, GetJob, and Job methods. Ensure that these methods are implemented correctly and provide the intended functionality.


19-19: New Method: Shutdown

The Worker interface now includes a Shutdown method. Ensure that this method is implemented correctly and provides a graceful shutdown mechanism for workers.

contracts/queue/driver.go (1)

3-16: New Driver Interface: Ensure Completeness and Correctness

The Driver interface introduces methods for job queue operations. Ensure that each method is implemented correctly and aligns with the intended functionality. Additionally, confirm that the interface supports all required operations for the queue drivers.

event/service_provider.go (1)

6-6: Package Import Alias: Ensure Consistency

The package import alias for event/console is changed to eventconsole. Ensure that the new alias is used consistently throughout the file and does not cause any conflicts.

queue/task_test.go (2)

30-31: Ensure type safety for job arguments.

The Args field now expects []any, which can lead to type safety issues. Ensure that the arguments are correctly typed and validated.

Are there any validations in place to ensure that the arguments passed to the job are of the expected types?


36-42: Good practice: Ensure cleanup after tests.

The test ensures that the created file is removed after the test. This is a good practice to avoid side effects in tests.

queue/service_provider.go (1)

35-38: Ensure command registration is clear and maintainable.

Registering commands in a separate method helps keep the Boot method clean and maintainable. This is a good practice.

queue/driver_sync.go (5)

13-17: LGTM!

The NewSync method correctly initializes the Sync struct.


19-21: LGTM!

The Connection method correctly returns the connection string.


23-25: LGTM!

The Driver method correctly returns the driver type.


44-47: Consider adding error handling.

The Later method should handle potential errors from time.Sleep and job execution.

-  time.Sleep(time.Duration(delay) * time.Second)
-  return job.Handle(args...)
+  if err := time.Sleep(time.Duration(delay) * time.Second); err != nil {
+    return err
+  }
+  if err := job.Handle(args...); err != nil {
+    return err
+  }
+  return nil

Likely invalid or redundant comment.


31-41: Consider adding error handling.

The Bulk method should handle potential errors from time.Sleep and job execution.

+  var sleepErr error
  for _, job := range jobs {
    if job.Delay > 0 {
-      time.Sleep(time.Duration(job.Delay) * time.Second)
+      if sleepErr = time.Sleep(time.Duration(job.Delay) * time.Second); sleepErr != nil {
+        return sleepErr
+      }
    }
    if err := job.Job.Handle(job.Args...); err != nil {
      return err
    }
  }

  return nil

Likely invalid or redundant comment.

queue/driver.go (1)

23-28: LGTM!

The NewDriverImpl method correctly initializes the DriverImpl struct.

event/task.go (2)

Line range hint 12-17:
LGTM!

The NewTask method correctly initializes the Task struct.


65-71: LGTM!

The eventArgsToQueueArgs method correctly converts event arguments to queue arguments.

queue/config.go (5)

40-43: LGTM!

The method logic is sound.


47-53: LGTM!

The method logic is sound.


Line range hint 11-14:
LGTM!

The method logic is sound.


Line range hint 18-20:
LGTM!

The method logic is sound.


55-58: Verify the usage of OrmFacade.

Ensure that OrmFacade is correctly configured and imported.

queue/application.go (6)

13-16: LGTM!

The method logic is sound.


36-41: LGTM!

The method logic is sound.


45-46: LGTM!

The method logic is sound.


48-49: LGTM!

The method logic is sound.


52-53: LGTM!

The method logic is sound.


57-57: LGTM!

The method logic is sound.

queue/worker.go (2)

21-28: LGTM!

The method logic is sound.


78-80: LGTM!

The method logic is sound.

event/task_test.go (4)

Line range hint 34-40:
LGTM!

The test logic is sound.


Line range hint 51-57:
LGTM!

The test logic is sound.


Line range hint 64-66:
LGTM!

The test logic is sound.


Line range hint 73-75:
LGTM!

The test logic is sound.

queue/driver_async.go (7)

21-25: LGTM!

The NewASync method correctly initializes the ASync struct.


27-29: LGTM!

The Connection method correctly returns the connection string.


31-33: LGTM!

The Driver method correctly returns the driver type.


35-41: LGTM!

The Push method correctly handles adding a job to the async job queue.


43-62: LGTM!

The Bulk method correctly handles adding multiple jobs to the async job queue, including delayed jobs.


64-73: LGTM!

The Later method correctly schedules a job to be added to the async job queue after a delay.


75-91: LGTM!

The Pop method correctly handles retrieving and removing the first job from the async job queue.

queue/task.go (7)

17-28: LGTM!

The NewTask method correctly initializes the Task struct.


32-39: LGTM!

The NewChainTask method correctly initializes the Task struct for a chain of jobs.


43-49: LGTM!

The Delay method correctly sets the delay time for the task.


51-66: LGTM!

The Dispatch method correctly handles task dispatching, including bulk and delayed dispatching.


Line range hint 70-84:
LGTM!

The DispatchSync method correctly handles synchronous task dispatching.


88-92: LGTM!

The OnConnection method correctly sets the connection name and updates the driver.


97-101: LGTM!

The OnQueue method correctly sets the queue name.

queue/job.go (5)

31-35: LGTM!

The NewJobImpl method correctly initializes the JobImpl struct.


37-46: LGTM!

The Register method correctly registers jobs to the injector and updates the signatures list.


48-57: LGTM!

The Call method correctly handles job invocation using the injector.


59-63: LGTM!

The Get method correctly retrieves a job using the injector.


65-79: LGTM!

The GetJobs method correctly retrieves all registered jobs using their signatures.

queue/console/migrate_make_command.go (7)

20-22: LGTM!

The NewMigrateMakeCommand method correctly initializes the struct.


24-26: LGTM!

The Signature method correctly returns the command signature.


29-31: LGTM!

The Description method correctly returns the command description.


34-39: LGTM!

The Extend method correctly returns the extension details of the console command.


41-53: LGTM!

The Handle method correctly handles file creation for migrations and prints a success message.


55-66: LGTM!

The getStub method correctly retrieves the stubs for different database drivers.


69-73: LGTM!

The getPath method correctly constructs the path for the migration files.

queue/console/migrate_stubs.go (4)

5-10: Ensure compatibility with MySQL standards.

The created_at and updated_at columns are defined with DATETIME(3). Ensure this precision is supported in your MySQL version.


41-43: Ensure compatibility with PostgreSQL standards.

The BIGINT GENERATED BY DEFAULT AS IDENTITY syntax is used for the id column. Verify this syntax is supported in your PostgreSQL version.


74-76: Ensure compatibility with SQLite standards.

The BIGINT PRIMARY KEY AUTOINCREMENT syntax is used for the id column. Verify this syntax is supported in your SQLite version.


Line range hint 107-109: Ensure compatibility with SQL Server standards.

The BIGINT NOT NULL IDENTITY(1,1) syntax is used for the id column. Verify this syntax is supported in your SQL Server version.

queue/driver_sync_test.go (3)

27-38: Ensure mock objects are properly set up.

The mock objects mockConfig and mockQueue are initialized and passed to the application. Ensure all necessary methods are mocked for the tests.


45-54: Ensure all relevant scenarios are covered.

The test case covers the basic functionality of the sync queue. Consider adding more scenarios to test edge cases and error handling.


56-77: Ensure all relevant scenarios are covered.

The test case covers the basic functionality of the chain sync queue. Consider adding more scenarios to test edge cases and error handling.

queue/config_test.go (6)

Line range hint 38-49: Ensure all relevant scenarios are covered.

The test case covers the basic configuration of the queue. Consider adding more scenarios to test edge cases and different configurations.


65-71: Ensure all relevant scenarios are covered.

The test case covers the basic configuration of the driver. Consider adding more scenarios to test edge cases and different configurations.


73-78: Ensure all relevant scenarios are covered.

The test case covers the basic configuration of the driver when a connection is provided. Consider adding more scenarios to test edge cases and different configurations.


80-86: Ensure all relevant scenarios are covered.

The test case covers the basic functionality of the Via method. Consider adding more scenarios to test edge cases and different configurations.


88-93: Ensure all relevant scenarios are covered.

The test case covers the basic functionality of the Via method when a connection is provided. Consider adding more scenarios to test edge cases and different configurations.


95-110: Ensure all relevant scenarios are covered.

The test case covers the basic functionality of the failed jobs query. Consider adding more scenarios to test edge cases and different configurations.

database/console/migrate_stubs.go (4)

8-9: Ensure compatibility with MySQL standards.

The BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT syntax is used for the id column. Verify this syntax is supported in your MySQL version.


41-43: Ensure compatibility with PostgreSQL standards.

The BIGINT GENERATED BY DEFAULT AS IDENTITY syntax is used for the id column. Verify this syntax is supported in your PostgreSQL version.


74-76: Ensure compatibility with SQLite standards.

The BIGINT PRIMARY KEY AUTOINCREMENT syntax is used for the id column. Verify this syntax is supported in your SQLite version.


107-109: Ensure compatibility with SQL Server standards.

The BIGINT NOT NULL IDENTITY(1,1) syntax is used for the id column. Verify this syntax is supported in your SQL Server version.

mail/application.go (1)

74-74: Ensure correct job creation.

The creation of the job using r.queue.Job seems correct. However, verify that NewSendMailJob and the arguments passed are appropriate and consistent with the rest of the implementation.

go.mod (2)

29-29: Dependency addition approved.

The addition of github.com/samber/do/v2 is appropriate and follows best practices.


95-95: Indirect dependency addition approved.

The addition of the indirect dependency github.com/mitchellh/hashstructure/v2 is appropriate and follows best practices.

mail/application_test.go (11)

41-41: Test case addition approved.

The test case for sending mail via port 465 is correct and follows best practices.


53-53: Test case addition approved.

The test case for sending mail via port 587 is correct and follows best practices.


65-65: Test case addition approved.

The test case for sending mail with a "From" address is correct and follows best practices.


78-78: Test case addition approved.

The test case for sending mail using a mailable object is correct and follows best practices.


84-84: Test case addition approved.

The test case for queuing mail is correct and follows best practices.


86-87: Job registration approved.

The registration of the new job for the queue is correct and follows best practices.


90-90: Error handling approved.

The error handling statement is correct and follows best practices.


115-115: Test case addition approved.

The test case for queuing mail with a mailable object is correct and follows best practices.


117-118: Job registration approved.

The registration of the new job for the queue is correct and follows best practices.


121-121: Error handling approved.

The error handling statement is correct and follows best practices.


139-142: Mock configuration function approved.

The mock configuration function is correct and follows best practices.

queue/driver_async_test.go (9)

1-1: Package declaration approved.

The package declaration is correct and follows best practices.


3-15: Import statements approved.

The import statements are correct and follow best practices.


17-23: Test job variables approved.

The test job variables are correct and follow best practices.


25-30: Test suite struct approved.

The test suite struct is correct and follows best practices.


32-51: Test suite setup function approved.

The test suite setup function is correct and follows best practices.


53-55: Setup test function approved.

The setup test function is correct and follows best practices.


57-81: Test function for default async queue approved.

The test function for the default async queue is correct and follows best practices.


83-111: Test function for delay async queue approved.

The test function for the delay async queue is correct and follows best practices.


113-141: Test function for custom async queue approved.

The test function for the custom async queue is correct and follows best practices.

mail/service_provider.go Show resolved Hide resolved
queue/service_provider.go Show resolved Hide resolved
queue/service_provider.go Show resolved Hide resolved
queue/service_provider.go Show resolved Hide resolved
event/application.go Show resolved Hide resolved
queue/driver_sync.go Show resolved Hide resolved
queue/driver_sync.go Show resolved Hide resolved
queue/console/migrate_make_command_test.go Show resolved Hide resolved
queue/driver.go Show resolved Hide resolved
queue/driver.go Show resolved Hide resolved
coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 10, 2024
@devhaozi
Copy link
Member Author

Currently, machinery has resumed maintenance, so this PR may no longer be needed.

@devhaozi devhaozi closed this Aug 21, 2024
@devhaozi devhaozi deleted the haozi/queue branch August 21, 2024 16:43
@hwbrzzl
Copy link
Contributor

hwbrzzl commented Aug 24, 2024

machinery still doesn't support the DB driver, right?

@devhaozi
Copy link
Member Author

machinery still doesn't support the DB driver, right?

Yes

@hwbrzzl
Copy link
Contributor

hwbrzzl commented Aug 25, 2024

If so, I think it's better to implement the DB driver ourselves.

@hwbrzzl hwbrzzl restored the haozi/queue branch August 31, 2024 15:45
@hwbrzzl hwbrzzl reopened this Aug 31, 2024
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.

✨ [Feature] Refactor the queue facades 🐛 [Bug] Queue always print DEBUG messages with redis driver
3 participants