{"id":21931319,"url":"https://github.com/themeplate/process","last_synced_at":"2026-03-01T16:04:38.482Z","repository":{"id":57068288,"uuid":"242008615","full_name":"ThemePlate/Process","owner":"ThemePlate","description":"Straightforward background processing tool","archived":false,"fork":false,"pushed_at":"2025-03-01T07:19:14.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-01T08:03:14.297Z","etag":null,"topics":["background","process","tasks","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThemePlate.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}},"created_at":"2020-02-20T23:01:07.000Z","updated_at":"2025-03-01T07:19:12.000Z","dependencies_parsed_at":"2022-08-24T14:54:11.005Z","dependency_job_id":null,"html_url":"https://github.com/ThemePlate/Process","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FProcess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FProcess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FProcess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThemePlate%2FProcess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThemePlate","download_url":"https://codeload.github.com/ThemePlate/Process/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959454,"owners_count":20538628,"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":["background","process","tasks","wordpress"],"created_at":"2024-11-28T23:13:31.478Z","updated_at":"2026-03-01T16:04:38.432Z","avatar_url":"https://github.com/ThemePlate.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThemePlate Process\n\n## Usage\n\n```php\nuse ThemePlate\\Process\\Async;\n\n// Instantiate\n$background = new Async( function() {\n\tlong_running_task();\n} );\n\n// Dispatch\n$background-\u003edispatch();\n```\n\n### new Async( $callback_func, $callback_args )\n\nExecute a heavy one-off task via a non-blocking request\n\n- **$callback_func** *(callable)(Required)* Function to run asynchronously\n- **$callback_args** *(array)(Optional)* Parameters to pass in the callback. Default `null`\n\n### -\u003edispatch()\n\nFire off the process in the background instantly\n\n### -\u003ethen( $callback )\n### -\u003ecatch( $callback )\n\nChainable methods to handle success or error\n\n- **$callback** *(callable)(Optional)*\n\n---\n\n```php\nuse ThemePlate\\Process\\Tasks;\n\n$chores = new Tasks( 'my_day' );\n\n$chores-\u003eadd( 'first_task', array( 'this', 'that' ) );\n$chores-\u003eadd( function() {\n\tanother_task();\n} );\n```\n\n### new Tasks( $identifier )\n\n- **$identifier** *(string)(Required)* Unique identifier\n\n### -\u003eadd( $callback_func, $callback_args )\n\n- **$callback_func** *(callable)(Required)* Function to run\n- **$callback_args** *(array)(Optional)* Parameters to pass. Default `null`\n\n### -\u003eremove( $callback_func, $callback_args )\n\n- **$callback_func** *(callable)(Required)* Supposed function to run\n- **$callback_args** *(array)(Optional)* The parameters passed. Default `null`\n\n### -\u003eclear()\n\nRemove all currently listed task\n\n### -\u003elimit( $number )\n\n- **$number** *(int)(Required)* Number of task per run\n\n### -\u003eevery( $second )\n\n- **$second** *(int)(Required)* Interval between runs\n\n### -\u003ereport( $callback )\n\n- **$callback** *(callable)(Required)* To run after completion\n\n### Helper methods\n#### -\u003eget_identifier()\n#### -\u003edump()\n#### -\u003eis_running()\n#### -\u003enext_scheduled()\n#### -\u003ehas_queued()\n#### -\u003eget_queued()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemeplate%2Fprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemeplate%2Fprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemeplate%2Fprocess/lists"}