hyperf redis延遲佇列

冯元春發表於2024-11-07
        $container = ApplicationContext::getContainer();

        $redis = $container->get(Redis::class);

        $timestamp = time() + $delay_seconds;
        return $redis->zAdd($queue_key, $timestamp, json_encode(["data_key":"data_value"]));

相關文章