{"id":19250259,"url":"https://github.com/charcoalphp/queue","last_synced_at":"2025-09-19T17:26:18.895Z","repository":{"id":37491858,"uuid":"505906495","full_name":"charcoalphp/queue","owner":"charcoalphp","description":"[READ-ONLY] Queue, Queue Items and Queue-able objects, for Charcoal","archived":false,"fork":false,"pushed_at":"2024-03-13T15:05:17.000Z","size":794,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T14:16:53.045Z","etag":null,"topics":["php","queue","read-only-repository"],"latest_commit_sha":null,"homepage":"https://github.com/charcoalphp/charcoal","language":"PHP","has_issues":false,"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/charcoalphp.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":"2022-06-21T15:44:58.000Z","updated_at":"2022-06-21T16:37:03.000Z","dependencies_parsed_at":"2024-01-13T05:28:19.194Z","dependency_job_id":"54105d47-4328-4e2c-9f68-859b78993c32","html_url":"https://github.com/charcoalphp/queue","commit_stats":{"total_commits":69,"total_committers":8,"mean_commits":8.625,"dds":0.7246376811594203,"last_synced_commit":"d0316e0dcd21726fad77bc7fa3a0a8c7a804c057"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/charcoalphp/queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charcoalphp","download_url":"https://codeload.github.com/charcoalphp/queue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charcoalphp%2Fqueue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274956085,"owners_count":25380670,"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-09-13T02:00:10.085Z","response_time":70,"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":["php","queue","read-only-repository"],"created_at":"2024-11-09T18:16:38.792Z","updated_at":"2025-09-19T17:26:18.874Z","avatar_url":"https://github.com/charcoalphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Charcoal Queue\n==============\n\nThe Queue package provides an abstract queue service to defer the processing of time consuming tasks.\n\n## Installation\n\n```shell\ncomposer require charcoal/queue\n```\n\n## Usage\n\n### Queueing System\n\nQueue managers loop queue items. Queue items represent actions to be performed (as defined by the `process()` method).\n\n### Queue Manager\n\nThe queue manager is available as an abstract class: `AbstractQueueManager`.\nThis class implements the `QueueManagerInterface`.\n\nThe processing speed (throttle) can be controlled via the `rate` property, in items per second.\n\nThe batch limit (number of items to process per iteration) can be controlled with the `limit` property.\n\nThe queue can be identified with the `queue_id`. It can be set with `setQueueId()`.\n\nThe queue can be processed with `processQueue()`.\nIf for any reason the items need to be loaded, it can be done with `loadQueueItems()`.\n\nThere are 4 callbacks that can be defined:\n\n* `setProcessedCallback()`\n* `setItemCallback()`\n* `setItemSuccessCallbak()`\n* `setItemFailureCallback()`\n\nThere are only 1 abstract method:\n\n* `queueItemProto()` which must returns a `QueueItemInterface` instance\n\n### Queue Items\n\nQueue Items should implement the `QueueItemInterface`. This can be helped via the `QueueItemTrait`.\n\nQueue items can be identified with a `queue_id`. (The same `queue_id` used by the queue manager).\n\nItems can be processed with `process($callback, $successCallback, $failureCallback)`.\n\nThe queue item properties are:\n\n* `queue_id`\n* `queue_item_data`\n* `queued_date`\n* `processing_date`\n* `processed_date`\n* `processed`\n\n### Queuable Objects\n\nThe `QueueableInterface` defines objects that can be queued. This interface is really simple and only provides:\n\n* `setQueueId()` which can be inherited from `QueueableTrait`\n* `queueId()` (`queue_id` getter) which can be inherited from `QueueableTrait`\n* `queue($ts = null)` which is abstract and must be written inside class which implement the queueable interface\n\n## Resources\n\n* [Contributing](https://github.com/charcoalphp/.github/blob/main/CONTRIBUTING.md)\n* [Report issues](https://github.com/charcoalphp/charcoal/issues) and\n  [send pull requests](https://github.com/charcoalphp/charcoal/pulls)\n  in the [main Charcoal repository](https://github.com/charcoalphp/charcoal)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Fqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharcoalphp%2Fqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharcoalphp%2Fqueue/lists"}