Skip to content

Commit dc9b261

Browse files
Jan-Schuppiklippserd
authored andcommitted
Replace usage of deprecated package clue/block-react
The package has been abandoned and migrated to `reac/async`.
1 parent bb757be commit dc9b261

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

library/Notifications/Daemon/Daemon.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
use React\EventLoop\Loop;
2323
use React\EventLoop\LoopInterface;
2424

25-
use function Clue\React\Block\await;
26-
use function React\Promise\Timer\sleep;
25+
use function React\Async\delay;
2726

2827
class Daemon extends EventEmitter
2928
{
@@ -323,8 +322,8 @@ protected function run(): void
323322

324323
$endMs = (int) (microtime(true) * 1000);
325324
if (($endMs - $beginMs) < 3000) {
326-
// run took less than 3 seconds; sleep for the remaining duration to prevent heavy db loads
327-
await(sleep((3000 - ($endMs - $beginMs)) / 1000));
325+
// run took less than 3 seconds; delay for the remaining duration to prevent heavy db loads
326+
delay((3000 - ($endMs - $beginMs)) / 1000);
328327
}
329328
}
330329
self::$logger::debug(self::PREFIX . "cancellation triggered; exiting loop");

0 commit comments

Comments
 (0)