Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.03 KB

reconnect.md

File metadata and controls

31 lines (23 loc) · 1.03 KB
layout api-command
language Python
permalink api/python/reconnect/
command reconnect
related_commands
connect use repl close
connect/
use/
repl/
close/

Command syntax

{% apibody %} conn.reconnect(noreply_wait=True) {% endapibody %}

Description

Close and reopen a connection.

Closing a connection normally waits until all outstanding requests have finished and then frees any open resources associated with the connection. By passing False to the noreply_wait optional argument, the connection will be closed immediately, possibly aborting any outstanding noreply writes.

A noreply query is executed by passing the noreply option to the run command, indicating that run() should not wait for the query to complete before returning. You may also explicitly wait for a noreply query to complete by using the noreply_wait command.

Example: Cancel outstanding requests/queries that are no longer needed.

conn.reconnect(noreply_wait=False)