{"id":26234870,"url":"https://github.com/flowpack/jobqueue-doctrine","last_synced_at":"2025-04-22T14:52:55.095Z","repository":{"id":9499953,"uuid":"62324894","full_name":"Flowpack/jobqueue-doctrine","owner":"Flowpack","description":"A job queue backend for the Flow framework, based on Doctrine","archived":false,"fork":false,"pushed_at":"2025-01-14T11:59:56.000Z","size":76,"stargazers_count":6,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T00:40:19.640Z","etag":null,"topics":["flowframework","flowpack","jobqueue","neoscms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flowpack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-30T16:07:07.000Z","updated_at":"2024-01-19T17:43:38.000Z","dependencies_parsed_at":"2024-06-18T22:51:16.121Z","dependency_job_id":"0ce192ff-c303-4fc0-ae38-0cb5e642880c","html_url":"https://github.com/Flowpack/jobqueue-doctrine","commit_stats":{"total_commits":40,"total_committers":9,"mean_commits":4.444444444444445,"dds":0.7,"last_synced_commit":"b2b057131ca3867f426a5bbe44cf3ca9e42a5261"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Fjobqueue-doctrine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Fjobqueue-doctrine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Fjobqueue-doctrine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flowpack%2Fjobqueue-doctrine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flowpack","download_url":"https://codeload.github.com/Flowpack/jobqueue-doctrine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250263658,"owners_count":21401926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flowframework","flowpack","jobqueue","neoscms"],"created_at":"2025-03-13T02:29:40.747Z","updated_at":"2025-04-22T14:52:55.075Z","avatar_url":"https://github.com/Flowpack.png","language":"PHP","readme":"# Flowpack.JobQueue.Doctrine\n\nA job queue backend for the [Flowpack.JobQueue.Common](https://github.com/Flowpack/jobqueue-common) package based on [Doctrine](http://www.doctrine-project.org/).\n\n## Usage\n\nInstall the package using Composer:\n\n```\ncomposer require flowpack/jobqueue-doctrine\n```\n\nIf not already installed, that will fetch its requirements, namely the \n`jobqueue-common` package.\n\nNow the queue can be configured like this:\n\n```yaml\nFlowpack:\n  JobQueue:\n    Common:\n      queues:\n        'some-queue':\n          className: 'Flowpack\\JobQueue\\Doctrine\\Queue\\DoctrineQueue'\n          executeIsolated: true\n          options:\n            defaultTimeout: 50\n          releaseOptions:\n            priority: 512\n            delay: 120\n```\n\nThe required tables can be created executing:\n\n```\n./flow queue:setup some-queue\n```\n\n## Boost Mode\n\nThe poll interval should be short enough to process messages in time, and long\nenough to minimize resource consumption for the database. Boost mode is a \nsolution which automatically handles spikes by processing messages in quick \nsuccession. When no new messages appear for a specified time, boost mode is\ndisabled again.\n\nThe frequency by which the queue loop will look for new messages is the \nconfigured `pollInterval`. In boost mode, the option `boostPollInterval` is \nused instead. `boostTime` defines the time since the last processed message \nafter which boost mode is deactivated again.\n\n## Specific options\n\nThe `DoctrineQueue` supports following options:\n\n| Option            | Type    |                                 Default | Description                                                                                                                                                             |\n|-------------------|---------|----------------------------------------:|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| defaultTimeout    | integer |                                      60 | Number of seconds new messages are waited for before a timeout occurs, this is overridden by a \"timeout\" argument in the `waitAndTake()` and `waitAndReserve()` methods |\n| pollInterval      | float   |                                       1 | Number of seconds between SQL lookups for new messages                                                                                                                  |\n| boostPollInterval | float   |                                     0.5 | Number of seconds between SQL lookups for new messages when in \"boost mode\"                                                                                             |\n| boostTime         | float   |                                      10 | Maximum number of seconds since last processed message to activate \"boost mode\"                                                                                         |\n| tableName         | string  | flowpack_jobqueue_messages_\u003cqueue-name\u003e | Name of the database table for this queue. By default this is the queue name prefixed with \"flowpack_jobqueue_messages_\"                                                |\n| backendOptions    | array   |                                       - | Doctrine-specific connection params (see [Doctrine reference](http://doctrine-orm.readthedocs.io/projects/doctrine-dbal/en/latest/reference/configuration.html))        |\n\n*NOTE:* The `DoctrineQueue` should work with any database supported by\nDoctrine DBAL. It has been tested on MySQL, PostgreSQL, SQL Server and \nSQLite. You can specify the backend via the `backendOptions`. If  you\nomit this setting, the *current connection* will be re-used (i.e. the \ncurrently active Flow database).\n\n### Submit options\n\nAdditional options supported by `JobManager::queue()`, `DoctrineQueue::submit()` and the `Job\\Defer` annotation:\n\n| Option | Type    | Default | Description                                                                                                                                                           |\n|--------|---------|--------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| delay  | integer |       0 | Number of seconds before a message is marked \"ready\" after submission. This can be useful to prevent premature execution of jobs (i.e. before entities are persisted) |\n\n### Release options\n\nAdditional options to be specified via `releaseOptions` for the queue:\n\n| Option | Type    | Default | Description                                                                      |\n|--------|---------|--------:|----------------------------------------------------------------------------------|\n| delay  | integer |       0 | Number of seconds before a message is marked \"ready\" after it has been released. |\n\n## License\n\nThis package is licensed under the MIT license\n\n## Contributions\n\nPull-Requests are more than welcome. Make sure to read the [Code Of Conduct](CodeOfConduct.rst).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowpack%2Fjobqueue-doctrine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowpack%2Fjobqueue-doctrine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowpack%2Fjobqueue-doctrine/lists"}