Skip to content

Commit 85e4c4d

Browse files
Alexandr Hacicheanttaylorotwell
Alexandr Hacicheant
authored andcommitted
[5.5] Worker: Allow to set sleep time less than 1 seconds (#22246)
* Worker: Allow to set sleep time less than 1 seconds * Fixed code style * Update Worker.php
1 parent a039b0c commit 85e4c4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Queue/Worker.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -593,12 +593,12 @@ public function kill($status = 0)
593593
/**
594594
* Sleep the script for a given number of seconds.
595595
*
596-
* @param int $seconds
596+
* @param int|float $seconds
597597
* @return void
598598
*/
599599
public function sleep($seconds)
600600
{
601-
sleep($seconds);
601+
usleep($seconds * 1000000);
602602
}
603603

604604
/**

0 commit comments

Comments
 (0)