lancepioch / tree

Connect your Github Repository to your Forge Server and Tree automatically deploys any new pull requests for you
MIT License
12 stars 3 forks source link

Throttle Forge API requests due to rate limiting #1

Open lancepioch opened 6 years ago

lancepioch commented 6 years ago

Laravel Forge restricts you to 60 api requests per minute.

Suggestion: Redis::throttle

lancepioch commented 5 years ago

https://github.com/laravel/ideas/issues/1356

    Redis::throttle('throttle:' . self::class)->allow(60)->every(60)->then(function () {
        // Job logic...
    }, function () {
        // Could not obtain lock...
        return $this->release(10);
    });
lancepioch commented 4 years ago

https://laravel.com/docs/6.x/queues#job-middleware