Skip to content

Documentation unclear on proper extended usage of WriteApi client  #190

@markmnl

Description

@markmnl

Does the WriteAPI client support context management? If so what does the context manager do - flush, close, wait for batch to complete? I cannot answer any of these queststions reading the doucmentation so I don't know if I should be creating a new instance of WriteApi client evey time I want to write a new batch..

Important: The WriteApi in batching mode (default mode) is suppose to run as a singleton. To flush all your data you should call _write_client.close() at the end of your script.

This part of the documentation I find contradictory - singleton implies never create another instance - but it goes on to say I should close to flush?? What if I have a service continuously running? How can I flush what has already been written if I want to? I don't feel confident reading the documentation using this library...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy