Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Explicitly set unit of sleep of retry function #36810

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

mrsimonbennett
Copy link
Contributor

@mrsimonbennett mrsimonbennett commented Mar 30, 2021

When using the retry function it was not clear from the function signature function what the sleep timer was? seconds, milliseconds or microseconds.

You could look at the code and discover you're using usleep * 100 to get to ms

Or you could look at the docs on laravel.com to see the code example

return retry(5, function () {
    // Attempt 5 times while resting 100ms in between attempts...
}, 100);

https://laravel.com/docs/8.x/helpers#method-retry

This PR just aims to save someone a few clicks and confusion

  • No breaking change
  • No test changes

@mrsimonbennett mrsimonbennett changed the title Explicitly set unit of sleep or retry functon [WIP] Explicitly set unit of sleep or retry functon Mar 30, 2021
@mrsimonbennett mrsimonbennett changed the title [WIP] Explicitly set unit of sleep or retry functon Explicitly set unit of sleep or retry functon Mar 30, 2021
@mrsimonbennett mrsimonbennett changed the title Explicitly set unit of sleep or retry functon [8.x] Explicitly set unit of sleep or retry function Mar 30, 2021
@mrsimonbennett mrsimonbennett changed the title [8.x] Explicitly set unit of sleep or retry function [8.x] Explicitly set unit of sleep of retry function Mar 30, 2021
@taylorotwell taylorotwell merged commit 2a73861 into laravel:8.x Mar 30, 2021
@mrsimonbennett mrsimonbennett deleted the patch-1 branch March 30, 2021 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants