{"id":14983657,"url":"https://github.com/mmucklo/dtcqueuebundle","last_synced_at":"2025-04-04T08:09:34.666Z","repository":{"id":2952908,"uuid":"3966797","full_name":"mmucklo/DtcQueueBundle","owner":"mmucklo","description":"Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}","archived":false,"fork":false,"pushed_at":"2024-05-14T23:38:17.000Z","size":1457,"stargazers_count":120,"open_issues_count":25,"forks_count":38,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T08:09:21.715Z","etag":null,"topics":["beanstalkd","doctrine","doctrine-orm","doctrine2","mongodb","mysql","orm","php","rabbitmq","redis","symfony","symfony2","symfony3","symfony4","workers"],"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/mmucklo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2012-04-08T20:46:25.000Z","updated_at":"2024-09-19T11:59:21.000Z","dependencies_parsed_at":"2024-06-21T00:26:37.942Z","dependency_job_id":"e43bd294-7700-4503-aa65-7ee9b6d69b25","html_url":"https://github.com/mmucklo/DtcQueueBundle","commit_stats":{"total_commits":433,"total_committers":23,"mean_commits":18.82608695652174,"dds":"0.23556581986143188","last_synced_commit":"11481017c777fd18930d3e3f5d26f5f07e9f4d4a"},"previous_names":[],"tags_count":104,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcQueueBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcQueueBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcQueueBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcQueueBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmucklo","download_url":"https://codeload.github.com/mmucklo/DtcQueueBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142074,"owners_count":20890653,"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":["beanstalkd","doctrine","doctrine-orm","doctrine2","mongodb","mysql","orm","php","rabbitmq","redis","symfony","symfony2","symfony3","symfony4","workers"],"created_at":"2024-09-24T14:07:44.408Z","updated_at":"2025-04-04T08:09:34.643Z","avatar_url":"https://github.com/mmucklo.png","language":"PHP","readme":"DtcQueueBundle\n==============\n\n[![Build Status](https://secure.travis-ci.org/mmucklo/DtcQueueBundle.png?branch=master)](http://travis-ci.org/mmucklo/DtcQueueBundle)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mmucklo/DtcQueueBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mmucklo/DtcQueueBundle/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/mmucklo/DtcQueueBundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mmucklo/DtcQueueBundle/?branch=master)\n[![SymfonyInsight](https://insight.symfony.com/projects/a417419a-2d04-43eb-b7a2-1a04a4dfcc8e/mini.svg)](https://insight.symfony.com/projects/a417419a-2d04-43eb-b7a2-1a04a4dfcc8e)\n\n\u003e Allow symfony developers to create background job as easily as: `$worker-\u003elater()-\u003eprocess(1,2,3)`\n\n### 6.0 Release\n\nSee [changes](CHANGELOG.md)\n\nUpgrading from 5.0: [see UPGRADING-6.0.md](UPGRADING-6.0.md)\n\nSupported Queues\n----------------\n\n- MongoDB via Doctrine-ODM\n- Mysql / Doctrine 2 supported databases via Doctrine-ORM\n- Beanstalkd via pheanstalk\n- RabbitMQ via php-amqplib\n- Redis support via Predis or PhpRedis, or through SncRedisBundle\n\n![Trends](/Resources/doc/images/trends-example.png?raw=true \"DtcQueue Trends\")\n\nIntroduction\n------------\n\nThis bundle provides a way to easily create and manage queued background jobs\n\n**Basic Features:**\n\n- Ease of Use\n   - Kickoff background tasks with a line of code or two\n   - Easily add background worker services\n      - Turn any code into background task with a few lines\n- Atomic operation for jobs\n   - For ORM-based queues this is done _without_ relying on transactions.\n- Admin interface\n   - Web-based Admin interface with an optional performance graph\n- Command Line Interface\n   - Commands to run, manage and debug jobs from console\n- Job Archival\n   - ORM and ODM managers have built-in job-archival for finished jobs\n- Logs errors from worker\n- Various safety checks for things such as stalled jobs, exception jobs\n   - Allows for reseting stalled and exception jobs via console commands\n- Built in Event Dispatcher\n\n**Job-specific Features:**\n   - Auto-retry on failure, exception\n      * If a job exits with a failure code, it can auto-retry\n      * Same for Exception if desired\n   - Priority\n      * Jobs can have levels of priority so that higher priority jobs can get processed first even if they were added\n      *  to the queue later.\n   - Future Jobs (ODM / ORM / Redis)\n      * Jobs can be scheduled to run at some time in the future\n   - Batch\n      * Jobs can be \"batched\" so that only one job runs, even if multiple are queued of the same type\n   - Expires\n      * Jobs can have an \"expires\" time so that they wont run after a certain point\n         * (useful if the queue gets backed up and a job is worthless after a certain time)\n   - Stalls (ODM / ORM)\n      * Jobs that crash the interpreter, or get terminated for some other reason can be detected\n         * These can be re-queued to run in the future.\n\nInstallation\n------------\n\n### Symfony 2/3\n\n[see /Resources/doc/symfony2-3.md](/Resources/doc/symfony2-3.md)\n\n### Symfony 4/5\n\n[see /Resources/doc/symfony4-5.md](/Resources/doc/symfony4-5.md)\n\nTroubleshooting\n---------------\n\n[see /Resources/doc/troubleshooting.md](/Resources/doc/troubleshooting.md)\n\nUsage\n-----\n\nCreate a worker class that will work on the background job.\n\nExample:\n   * __src/Worker/Fibonacci.php:__ (symfony 4/5)\n   * __src/AppBundle/Worker/Fibonacci.php:__ (symfony 2/3)\n```php\n\u003c?php\nnamespace App\\Worker; // for symfony 2/3, the namespace would typically be AppBundle\\Worker\n\nclass Fibonacci\n    extends \\Dtc\\QueueBundle\\Model\\Worker\n{\n    private $filename;\n    public function __construct() {\n        $this-\u003efilename = '/tmp/fib-result.txt';\n    }\n\n    public function fibonacciFile($n) {\n        $fib = $this-\u003efibonacci($n);\n        file_put_contents($this-\u003efilename, \"{$n}: {$fib}\");\n    }\n\n\n    public function fibonacci($n)\n    {\n        if($n == 0)\n            return 0; //F0\n        elseif ($n == 1)\n            return 1; //F1\n        else\n            return $this-\u003efibonacci($n - 1) + $this-\u003efibonacci($n - 2);\n    }\n\n    public function getName() {\n        return 'fibonacci';\n    }\n\n    public function getFilename()\n    {\n        return $this-\u003efilename;\n    }\n}\n```\n\nCreate a DI service for the job, and tag it as a background worker.\n\n##### YAML:\n\n__Symfony 5, 4 and 3.3, 3.4:__\n```yaml\nservices:\n    # for symfony 3 the class name would likely be AppBundle\\Worker\\FibonacciWorker\n    App\\Worker\\Fibonacci:\n        # public: false is possible if you completely use DependencyInjection for access to the service\n        public: true\n        tags:\n            - { name: \"dtc_queue.worker\" }\n```\n\n__Symfony 2, and 3.0, 3.1, 3.2:__\n\n```yaml\nservices:\n    app.worker.fibonacci:\n        class: AppBundle\\Worker\\Fibonacci:\n        tags:\n            - { name: \"dtc_queue.worker\" }\n```\n\n##### XML:\n```xml\n\u003cservices\u003e\n\t\u003c!-- ... --\u003e\n\t\u003cservice id=\"fibonacci\" class=\"Fibonacci\"\u003e\n\t    \u003ctag name=\"dtc_queue.worker\" /\u003e\n\t\u003c/service\u003e\n\t\u003c!-- ... --\u003e\n\u003c/services\u003e\n```\n\n\n#### Create a job\n\nSimple examples:\n\n##### Command line:\n```bash\nbin/console dtc:queue:create_job \u003cworker\u003e \u003cmethod\u003e \u003carg\u003e\n\nbin/console dtc:queue:create_job fibonacci fibonacci 3\n\nbin/console dtc:queue:create_job fibonacci fibonacciFile 8\n```\n\n##### Code:\n```php\n// Dependency inject the worker or fetch it from the container\n$fibonacci = $container-\u003eget('App\\Worker\\Fibonacci');\n\n// For Symfony 3.3, 3.4\n//     $fibonacci = $container-\u003eget('AppBundle\\Worker\\Fibonacci');\n//\n\n// For Symfony 2, 3.0, 3.1, 3.2:\n//     $fibonacci = $container-\u003eget('app.worker.fibonacci');\n\n\n// Basic Examples\n$fibonacci-\u003elater()-\u003efibonacci(20);\n$fibonacci-\u003elater()-\u003efibonacciFile(20);\n\n// Batch Example\n$fibonacci-\u003ebatchLater()-\u003efibonacci(20); // Batch up runs into a single run\n\n// Timed Example\n$fibonacci-\u003elater(90)-\u003efibonacci(20); // Run 90 seconds later\n\n// Priority\n//    Note: whether 1 == High or Low priority is configurable, but by default it is High\n$fibonacci-\u003elater(0, 1); // As soon as possible, High priority\n$fibonacci-\u003elater(0, 125); // Medium priority\n$fibonacci-\u003elater(0, 255); // Low priority\n\n// Advanced Usage Example:\n//  (If the job is not processed by $expireTime, then don't execute it ever...)\n$expireTime = time() + 3600;\n$fibonacci-\u003elater()-\u003esetExpiresAt(new \\DateTime(\"@$expireTime\"))-\u003efibonacci(20); // Must be run within the hour or not at all\n```\n\n##### Create Jobs - Additional Information\n\nFor further instructions on creating jobs, including how to create a job from the _command line_ using json-encoded arguments, see:\n\n[/Resources/doc/create-job.md](/Resources/doc/create-job.md)\n\nRunning Jobs\n------------\nIt's recommended that you background the following console commands\n\n```bash\nbin/console dtc:queue:run -d 120\n```\n\n```bash\n# the -d parameter is the number of seconds during which to keep executing jobs before ending. \n#  For example you could put the above command into cron or a cron-like system to run every 2 minutes\n#\n# There are a number of other parameters that could be passed to dtc:queue:run run this for a full list:\nbin/console dtc:queue:run --help\n```\n\nPruning Jobs\n------------\nFor ODM and ORM based stores, the archive tables and the regular job table (queue) can require periodic pruning.\n\nThe _regular job table_ is for waiting and running jobs. If a job throws an exception that can't be caught or the process segfaults, machine crashes, etc. then jobs which never finished can remain in the job queue in the \"Running\" state.\n\nThe _archive table_ is where finished and errored jobs end up after execution; this table can grow indefinitely.\n\nFor Mongo in production, it may be prudent to use a [capped collection](https://docs.mongodb.com/manual/core/capped-collections/) or [TTL Indexes](https://docs.mongodb.com/manual/core/index-ttl/)\n\nFor Mysql you could create an event to delete data periodically.\n\nNevertheless there are also several commands that exist that do similarly (and could be put into a periodic cron job as well):\n\n```bash\nbin/console dtc:queue:prune old --older 1m\n# (deletes jobs older than one month from the Archive table)\n\n# Clear out stalled jobs from the regular job table:\nbin/console dtc:queue:prune stalled\n\n# If you're recording runs...this is recommended:\nbin/console dtc:queue:prune stalled_runs\n\n# If you're recording runs...another recommendation\nbin/console dtc:queue:prune old_runs --older 1m\n\n# If you're recording timings\nbin/console dtc:queue:prune old_job_timings --older 1m\n\n# You can tune 1m to a smaller interval such as 10d (10 days) or even 1800s (1/2 hour)\n#  if you have too many jobs flowing through the system.\n```\n\n```bash\nbin/console dtc:queue:prune --help # lists other prune commands\n```\n\nDebugging\n---------\nThese commands may help with debugging issues with the queue:\n\n```bash\nbin/console dtc:queue:count # some status about the queue if available (ODM/ORM only)\nbin/console dtc:queue:reset # resets errored and/or stalled jobs\n\n# This is really only good for ORM/ODM based stores.\nbin/console dtc:queue:run --id={jobId}\n\n# (jobId could be obtained from mongodb / or your database, if using an ORM / ODM solution)\n```\n\nTracking Runs\n-------------\nEach job run can be tracked in a table in an ORM / ODM backed datastore.\n\nWays to configure:\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    manager:\n        # run defaults to whatever job is set to (which defaults to \"odm\", i.e. mongodb)\n        #   If you set the job to rabbit_mq, or beanstalkd or something else, you need to set run\n        #   to an ORM / ODM run_manager (or a custom such one) in order to get the runs to save\n        #\n        run: orm # other possible option is \"odm\" (i.e. mongodb)\n    #\n    # (optionally define your own run manager with id: dtc_queue.manager.run.{some_name} and put {some_name} under run:\n```\n\nMongoDB DocumentManager\n------------------------\nChange the document manager\n\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    odm:\n        document_manager: {something} # default is \"default\"\n```\n\nMysql / ORM Setup\n-----------------\n\n### As of 4.0, ORM requires the [bcmath](http://php.net/manual/en/book.bc.php) extension to be enabled\n\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    manager:\n       job: orm\n```\n\n__Change the EntityManager:__\n\n```yaml\ndtc_queue:\n    orm:\n        entity_manager: {something} # default is \"default\"\n```\n\n__NOTE:__ You may need to add DtcQueueBundle to your mappings section in config.yml if auto_mapping is not enabled\n\n```yaml\ndoctrine:\n   #...\n   orm:\n       #...\n       mappings:\n           DtcQueueBundle: ~\n```\n\nNote on NON-ORM Setups:\n-----------------------\nIf you plan on using ODM or Redis or another configuration, but you have Doctrine ORM enabled elsewhere, it's recommended that you use the *[schema_filter](https://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html#manual-tables)* configuration parameter so that schema dumps and/or migration diffs don't pickup those tables (see [issue #77](https://github.com/mmucklo/DtcQueueBundle/issues/77)).\n\nE.g.\n```yaml\ndoctrine:\n   # ...\n   dbal:\n       # ...\n       schema_filter: ~^(?!dtc_)~\n```\n\n_(if you already have a schema_filter, you can just add the \"dtc\\_\" prefix to it.)_\n\nBeanstalk Configuration\n------------------------\n\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    beanstalkd:\n        host: beanstalkd\n        tube: some-tube-name [optional]\n    manager:\n        job: beanstalkd\n```\n\nRabbitMQ Configuration\n----------------------\n\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    manager:\n        job: rabbit_mq\n    rabbit_mq:\n        host: rabbitmq\n        port: 5672\n        user: guest\n        password: guest\n        vhost: \"/\" [optional defaults to \"/\"]\n        ssl: [optional defaults to false - toggles to use AMQPSSLConnection]\n        options: [optional options to pass to AMQPStreamConnection or AMQPSSLConnection]\n        ssl_options: [optional extra ssl options to pass to AMQPSSLConnection]\n        queue_args: [optional]\n            queue: [optional queue name]\n            passive: [optional defaults to false]\n            durable: [optional defaults to true]\n            exlusive: [optional defaults to false]\n            auto_delete: [optional defaults to false]\n        exchange_args: [optional]\n            exchange: [optional queue name]\n            type: [optional defaults to \"direct\"]\n            passive: [optional defaults to false]\n            durable: [optional defaults to true]\n            auto_delete: [optional defaults to false]\n```\n\nRedis Configuration\n-------------------\n\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    manager:\n        job: redis\n    redis:\n        # choose one of the below snc_redis, predis, or phpredis\n        snc_redis:\n           type: predis\n           alias: default\n        predis:\n            # choose one of dns or connection_parameters\n            dsn: redis://localhost\n            connection_parameters:\n                scheme: tcp\n                host: localhost\n                port: 6379\n                path: ~\n                database: ~\n                password: ~\n                async: false\n                persistent: false\n                timeout: 5.0\n                read_write_timeout: ~\n                alias: ~\n                weight: ~\n                iterable_multibulk: false\n                throw_errors: true\n        phpredis:\n            # minimum fill host and port if needed\n            host: localhost\n            port: 6379\n            timeout: 0\n            retry_interval: ~\n            read_timeout: 0\n            auth: ~\n```\n\nCustom Jobs and Managers\n------------------------\n\n__app/config/config.yml:__ (symfony 2/3)\n__config/packages/dtc_queue.yaml:__ (symfony 4/5)\n```yaml\ndtc_queue:\n    class_job: Some\\Job\\ClassName [optional]\n    manager:\n        job: some_name [optional]\n    # (create your own manager service and name or alias it:\n    #   dtc_queue.manager.job.\u003csome_name\u003e and put\n    #   \u003csome_name\u003e in the manager: job field above)\n```\n\nRename the Database or Table Name\n---------------------------------\n\n1) Extend the following:\n\n```\nDtc\\QueueBundle\\Document\\Job\nDtc\\QueueBundle\\Document\\JobArchive\n```\n\n   __or__\n\n```\nDtc\\QueueBundle\\Entity\\Job\nDtc\\QueueBundle\\Entity\\JobArchive\n```\n\n(Depending on whether you're using MongoDB or an ORM)\n\n2) Change the parameters on the class appropriately\n\n```php\n\u003c?php\nnamespace App\\Entity; // Or whatever\n\nuse Dtc\\QueueBundle\\Entity\\Job as BaseJob;\nuse Doctrine\\ORM\\Mapping as ORM;\n\n#[ORM\\Entity]\n#[ORM\\Table(name: 'job_some_other_name')]\n#[ORM\\Index(columns: ['crc_hash', 'status'], name: 'job_crc_hash_idx')]\n#[ORM\\Index(columns: ['priority', 'whenAt'], name: 'job_priority_idx')]\n#[ORM\\Index(columns: ['whenAt'], name: 'job_when_idx')]\n#[ORM\\Index(columns: ['status', 'whenAt'], name: 'job_status_idx')]\nclass Job extends BaseJob {\n}\n\n// ... similarly for Entity\\JobArchive if necessary\n```\n\n```php\n\u003c?php\nnamespace App\\Document;\n\nuse Doctrine\\ODM\\MongoDB\\Mapping\\Annotations as ODM;\nuse Dtc\\QueueBundle\\Document\\Job as BaseJob;\n\n#[ODM\\Document(db: 'my_db', collection: 'my_job_collection')]\nclass Job extends BaseJob\n{\n}\n\n// ... similarly for Document\\JobArchive if necessary\n```\n\n\n3) Add the new class(es) to config.yml\n\n```yaml\n# config.yml\n# ...\ndtc_queue:\n    class_job: App\\Entity\\Job\n    class_job_archive: App\\Entity\\JobArchive\n```\n\n\nJob Event Subscriber\n--------------------\n\nIt's useful to listen to event in a long running script to clear doctrine manager or send email about status of a job. To\nadd a job event subscriber, create a new service with tag: dtc_queue.event_subscriber:\n\n```yaml\nservices:\n    voices.queue.listener.clear_manager:\n        class: ClearManagerSubscriber\n        arguments:\n            - '@service_container'\n        tags:\n            - { name: dtc_queue.event_subscriber, connection: default }\n```\n\nClearManagerSubscriber.php\n\n```php\n\u003c?php\nuse Dtc\\QueueBundle\\EventDispatcher\\Event;\nuse Dtc\\QueueBundle\\EventDispatcher\\EventSubscriberInterface;\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\n\nclass ClearManagerSubscriber\n    implements EventSubscriberInterface\n{\n    private $container;\n    public function __construct(ContainerInterface $container) {\n        $this-\u003econtainer = $container;\n    }\n\n    public function onPostJob(Event $event)\n    {\n        $managerIds = [\n            'doctrine.odm.mongodb.document_manager',\n            'doctrine.orm.default_entity_manager',\n            'doctrine.orm.content_entity_manager'\n        ];\n\n        foreach ($managerIds as $id) {\n            $manager = $this-\u003econtainer-\u003eget($id);\n            $manager-\u003eclear();\n        }\n    }\n\n    public static function getSubscribedEvents()\n    {\n        return array(\n            Event::POST_JOB =\u003e 'onPostJob',\n        );\n    }\n}\n```\n\nRunning as upstart service:\n---------------------------\n\n1. Create the following file in /etc/init/. PHP is terrible at memory management\n and garbage collection: to deal with out of memory issues, run 20 jobs at\n a time. (Or a manageable job size)\n\n```bash\n# /etc/init/queue.conf\n\nauthor \"David Tee\"\ndescription \"Queue worker service, run 20 jobs at a time, process timeout of 3600\"\n\nrespawn\nstart on startup\n\nscript\n        /{path to}/console dtc:queue:run --max-count 20 -v -t 3600\u003e\u003e /var/logs/queue.log 2\u003e\u00261\nend script\n```\n\n2. Reload config: sudo initctl reload-configuration\n3. Start the script: sudo start queue\n\nAdmin\n-----\n**NOTE:** ORM And ODM (MongoDB) require [mmucklo/grid-bundle](https://github.com/mmucklo/DtcGridBundle) in order to view the jobs/runs admin page.\n\n\nYou can register admin routes to see queue status. In your routing.yml file, add the following:\n\n```yaml\ndtc_queue:\n    resource: '@DtcQueueBundle/Resources/config/routing.yml'\n```\n\nTesting\n-------\n\nYou can run unittest by typing `bin/phpunit` in source folder. If you want to run\nintegration testing with Mongodb, you need to set up Mongodb server on\nlocalhost and run:\n\n```bash\nbin/phpunit Tests/Document/JobManagerTest.php\n```\n\nIf you want to run Beanstalkd integration testing, you need to run a local, empty instance of beanstalkd for testing.\n\n```bash\nsudo service beanstalkd restart; BEANSTALKD_HOST=localhost bin/phpunit Tests/BeanStalkd/JobManagerTest.php\n```\n\nFull Configuration\n==================\nSee [/Resources/doc/full-configuration.md](/Resources/doc/full-configuration.md)\n\nLicense\n-------\n\nThis bundle is under the MIT license.\n\nCredit\n--------\nOriginally written by @dtee\nEnhanced and maintained by @mmucklo\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmucklo%2Fdtcqueuebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmucklo%2Fdtcqueuebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmucklo%2Fdtcqueuebundle/lists"}