mariano / disque-php

PHP library for Disque, an in-memory, distributed job queue
MIT License
132 stars 19 forks source link

Implement PING - optional argument #53

Open dominics opened 7 years ago

dominics commented 7 years ago

The PING command is useful for checking for underlying timeouts, connection issues, dead server nodes, etc. PING appears to be implemented the same as Redis's PING (but I've asked upstream whether it's likely to be supported long-term.)

It works like this:

127.0.0.1:7711> PING
PONG
127.0.0.1:7711> PING something
"something"

This means that the PING command takes one optional string argument. It appears that neither ARGUMENTS_TYPE_STRING nor ARGUMENTS_TYPE_EMPTY quite covers this type of command.