{"id":25419437,"url":"https://github.com/gowork/throttler","last_synced_at":"2025-07-30T16:36:08.840Z","repository":{"id":52451839,"uuid":"228467647","full_name":"gowork/throttler","owner":"gowork","description":"Simple PHP execution throttler.","archived":false,"fork":false,"pushed_at":"2021-04-28T22:10:15.000Z","size":15,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T02:05:22.205Z","etag":null,"topics":["php","throttle","throttler","throttling"],"latest_commit_sha":null,"homepage":null,"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/gowork.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":"2019-12-16T20:14:42.000Z","updated_at":"2022-01-26T17:09:59.000Z","dependencies_parsed_at":"2022-08-25T05:10:54.462Z","dependency_job_id":null,"html_url":"https://github.com/gowork/throttler","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gowork/throttler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowork%2Fthrottler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowork%2Fthrottler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowork%2Fthrottler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowork%2Fthrottler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gowork","download_url":"https://codeload.github.com/gowork/throttler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gowork%2Fthrottler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267899755,"owners_count":24163000,"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-07-30T02:00:09.044Z","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","throttle","throttler","throttling"],"created_at":"2025-02-16T18:39:52.120Z","updated_at":"2025-07-30T16:36:08.773Z","avatar_url":"https://github.com/gowork.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Throttler\n\n[![Build Status](https://travis-ci.org/gowork/throttler.svg?branch=master)](https://travis-ci.org/gowork/throttler)\n\nUse the throttle to control the speed.\n\n```php\nuse GW\\Throttler\\Throttler;\n\n$throttler = new Throttler(1.0);\n\nforeach ($heavyTasks-\u003eall() as $task) {\n    $throttler-\u003ethrottle(); // wait a second... before next task\n    $task-\u003erun();\n}\n```\n\nAlternative usage for wrapping iterables:\n\n```php\nuse GW\\Throttler\\Throttler;\n\n$throttledTask = Throttler::iterable($heavyTasks-\u003eall(), 1.0);\n\nforeach ($throttledTask as $task) {\n    $task-\u003erun(); // for each iteration it will sleep one second\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgowork%2Fthrottler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgowork%2Fthrottler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgowork%2Fthrottler/lists"}