-3
import rethinkdb as r

con=r.connect(host='localhost')

How do I ping? How do I used existing connection to ping DB server?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vinay Sawant
  • 368
  • 2
  • 7
  • 23

1 Answers1

0

If you want to check that the connection is still healthy and running queries, you could do something like r.expr(0).run(conn) == 0.

mlucy
  • 5,249
  • 1
  • 17
  • 21