bronek89 / throttler

Simple PHP execution throttler.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throttler

Build Status

Use the throttle to control the speed.

use GW\Throttler\Throttler;

$throttler = new Throttler(1.0);

foreach ($heavyTasks->all() as $task) {
    $throttler->throttle(); // wait a second... before next task
    $task->run();
}

About

Simple PHP execution throttler.

License:MIT License


Languages

Language:PHP 100.0%