2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-22 22:06:12 +08:00

Add healthchecker to check broker connection

This commit is contained in:
Ken Hibino
2020-07-25 18:49:27 -07:00
parent 5c87cb3ed1
commit b2ed2fa97b
6 changed files with 240 additions and 17 deletions

View File

@@ -45,6 +45,11 @@ func (r *RDB) Close() error {
return r.client.Close()
}
// Ping checks the connection with redis server.
func (r *RDB) Ping() error {
return r.client.Ping().Err()
}
// KEYS[1] -> asynq:queues:<qname>
// KEYS[2] -> asynq:queues
// ARGV[1] -> task message data