Lazily make connection with the underlying adapter - #9
Open
thetutlage wants to merge 8 commits into
Open
Conversation
…ent and during start phase BREAKING CHANGE: Any custom console commands relying on jobs to be registered with the queue manager will not work. They will have to resolve the queue.manager from the container and explicitly invoke the start method
The redis and database drivers acquired their connection when the config provider was resolved, which happens during the provider's start hook. Therefore, starting the app opened a connection even when nothing used the queue. The connection is now acquired from within the adapter factory, which the queue manager invokes on first use of the adapter. An app that never becomes ready (for example, the codegen command) skips the shutdown hooks, hence the eagerly opened redis connection kept the process alive. The driver tests run against a real redis server and an in-memory sqlite database. The CI workflow defines the tests job inline, since a job using the shared workflow cannot attach the redis service.
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
An app created in the "warmup" mode never becomes ready, hence nothing dispatches or processes jobs. Loading the jobs only discovers them for no use and warns when there are none. The mode is checked defensively, since the older versions of the framework core do not have the "getMode" method.
The merge kept the "start" method patched on the queue manager and the "initQueue" helper, whereas the 0.x branch initializes the queue manager from the container binding and loads the jobs from the "loadJobs" method
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.
No description provided.