{"id":19458840,"url":"https://github.com/leafsphp/queue","last_synced_at":"2025-08-16T01:15:55.410Z","repository":{"id":184908722,"uuid":"647940852","full_name":"leafsphp/queue","owner":"leafsphp","description":"🛠️ [WIP] Queue/Worker implementation for Leaf","archived":false,"fork":false,"pushed_at":"2025-03-08T22:46:48.000Z","size":73,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"v4.x","last_synced_at":"2025-08-01T23:46:25.329Z","etag":null,"topics":[],"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/leafsphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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,"zenodo":null},"funding":{"open_collective":"leaf","github":"leafsphp"}},"created_at":"2023-05-31T21:24:24.000Z","updated_at":"2025-03-08T22:44:44.000Z","dependencies_parsed_at":"2023-12-14T10:36:01.352Z","dependency_job_id":"25a82e12-0226-4a58-bc79-374f0595904e","html_url":"https://github.com/leafsphp/queue","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.08695652173913049,"last_synced_commit":"3b1f17e123fda53d32cdef431b542683b069e29b"},"previous_names":["leafsphp/queue"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/leafsphp/queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafsphp","download_url":"https://codeload.github.com/leafsphp/queue/tar.gz/refs/heads/v4.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Fqueue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269792964,"owners_count":24476661,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T17:28:41.924Z","updated_at":"2025-08-16T01:15:55.383Z","avatar_url":"https://github.com/leafsphp.png","language":"PHP","readme":"\u003c!-- markdownlint-disable no-inline-html --\u003e\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://leafphp.dev/logo-circle.png\" height=\"100\"/\u003e\n  \u003cbr\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eLeaf Queue\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://packagist.org/packages/leafs/queue\"\n\t\t\u003e\u003cimg\n\t\t\tsrc=\"https://poser.pugx.org/leafs/queue/v/stable\"\n\t\t\talt=\"Latest Stable Version\"\n\t/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://packagist.org/packages/leafs/queue\"\n\t\t\u003e\u003cimg\n\t\t\tsrc=\"https://poser.pugx.org/leafs/queue/downloads\"\n\t\t\talt=\"Total Downloads\"\n\t/\u003e\u003c/a\u003e\n\t\u003ca href=\"https://packagist.org/packages/leafs/queue\"\n\t\t\u003e\u003cimg\n\t\t\tsrc=\"https://poser.pugx.org/leafs/queue/license\"\n\t\t\talt=\"License\"\n\t/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\nImplementing a queuing system from scratch can be a daunting task, and can take a lot of time. For this reason, Leaf aims to provide a unified API for using queues across a variety of different backends, such as Amazon SQS, BeanStalk, Redis, or a database of your choice.\n\n## Basic Usage\n\nIn simple terms, this package allows you to push \"heavy\" tasks into a queue and run them in the background. This is useful for tasks that take a long time to complete, such as sending emails, processing images, etc.\n\nWe try to simplify the process of creating and running queues as much as possible, so, for most of the time, you'll only need to create your jobs and run the queue from the command line.\n\n### Creating a Job\n\nJobs are basically classes that extend the `Leaf\\Queues\\Job` class. They must implement the `handle` method, which is called when the job is run.\n\n```php\n\u003c?php\n\nclass ExampleJob extends \\Leaf\\Queue\\Job\n{\n    public function handle()\n    {\n        echo \"This is being called from the queue!\" . date(\"Y-m-d H:i:s\") . \"\\n\";\n    }\n}\n```\n\n### Running the Queue\n\nTo run the queue, all you need to do is run the `queue:run` command from the command line. This will run all jobs in the queue.\n\n```bash\nleaf queue:run\n```\n\n### Pushing Jobs to the Queue\n\nTo push a job to the queue, you can use the `dispatch` method on your job class.\n\n```php\nExampleJob::dispatch();\n```\n\n## Stay In Touch\n\n-   [Twitter](https://twitter.com/leafphp)\n-   [Join the forum](https://github.com/leafsphp/leaf/discussions/37)\n-   [Chat on discord](https://discord.com/invite/Pkrm9NJPE3)\n\n## Learning Leaf 3\n\n-   Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf.\n-   You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics\n-   You can also learn from [codelabs](https://codelabs.leafphp.dev) and contribute as well.\n\n## Contributing\n\nWe are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀.\n\nTo report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project.\n\n## Sponsoring Leaf\n\nYour cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on [open collective](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute.\n\nAnd to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️\n\n## Links/Projects\n\n-   [Leaf Docs](https://leafphp.dev)\n-   [Leaf MVC](https://mvc.leafphp.dev)\n-   [Leaf API](https://api.leafphp.dev)\n-   [Leaf CLI](https://cli.leafphp.dev)\n-   [Aloe CLI](https://leafphp.dev/aloe-cli/)\n","funding_links":["https://opencollective.com/leaf","https://github.com/sponsors/leafsphp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Fqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafsphp%2Fqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Fqueue/lists"}