{"id":15497671,"url":"https://github.com/devuri/queue-job-slim","last_synced_at":"2025-03-22T17:14:55.193Z","repository":{"id":101722549,"uuid":"134076594","full_name":"devuri/queue-job-slim","owner":"devuri","description":"Queue the job for slim","archived":false,"fork":false,"pushed_at":"2018-05-06T06:17:25.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T14:21:35.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devuri.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2018-05-19T15:58:42.000Z","updated_at":"2018-10-25T03:13:28.000Z","dependencies_parsed_at":"2023-05-22T11:15:17.144Z","dependency_job_id":null,"html_url":"https://github.com/devuri/queue-job-slim","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"ce4ffd7a20616a2799637172728f1eecc249314c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Fqueue-job-slim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Fqueue-job-slim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Fqueue-job-slim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Fqueue-job-slim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devuri","download_url":"https://codeload.github.com/devuri/queue-job-slim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244991175,"owners_count":20543627,"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":[],"created_at":"2024-10-02T08:40:25.392Z","updated_at":"2025-03-22T17:14:55.163Z","avatar_url":"https://github.com/devuri.png","language":"PHP","readme":"# rodrigoiii/queue-job-slim\n\nDon't let your visitor wait to finish the process of your application.\nThe goal of this library is to ease the loading process.\nJust create the job and let it do that for you.\n\n## Setup for server side\nI assume you are using slim micro framework. If not ignore this library.\n\nCreate file `server.php` or any name do you want and include the `autoload.php` file.\nInstantiate your worker and put the host.\n\n```php\n$queue = new QueueJobSlim\\Worker(\"127.0.0.1\");\n```\n\nThen put your jobs to watch it.\n\n```php\n$queue-\u003elisten([\"PunchUp\", \"PunchDown\"]);\n```\nAfter all, just run it in the terminal/console. Like `php server.php`\n\n## Setup for client side\nPut your queue-job settings in slim application like below.\n\n```php\n$app = new Slim\\App([\n    'settings' =\u003e [\n        'displayErrorDetails' =\u003e true,\n\n        'queue-job' =\u003e [\n            'host' =\u003e \"127.0.0.1\", // this is host\n            'job_namespace' =\u003e \"Example\\Jobs\" // this is where your jobs location\n        ]\n    ]\n]);\n```\n\nGet the container of application (this is must because the library will fetch it globally).\n```php\n$container = $app-\u003egetContainer();\n```\n\nAnd then produce what job you want to process.\n```php\n$app-\u003eget('/test', function ()\n{\n    QueueJobSlim\\Producer::send(\"PunchDown\"); // Call the PunchDown job\n    QueueJobSlim\\Producer::send(\"PunchUp\", [\"ouch\"]); // Call the PunchUp job with argument \"ouch\"\n});\n\n$app-\u003erun();\n```\n\nCheckout the demo in this link https://github.com/rodrigoiii/queue-job-slim/tree/master/example.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevuri%2Fqueue-job-slim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevuri%2Fqueue-job-slim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevuri%2Fqueue-job-slim/lists"}