PHP code example of g41797 / queue-valkey
1. Go to this page and download the library: Download g41797/queue-valkey library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
g41797 / queue-valkey example snippets
[
'host' => '127.0.0.1', // IP or hostname of the target server
'port' => 6379, // TCP/IP port of the target server
'path' => null, // Path of the UNIX domain socket file used when connecting to Valkey using UNIX domain sockets.
]
// Push a job into the queue and get a message ID.
$id = $queue->push(new SomeJob());
// Get job status.
$status = $queue->status($id);