Skip to content

how to pass timeout parameter to helper methods? #163

@phosphene

Description

@phosphene

I appreciate the convenience of streaming_bulk. thank you for that. What is the preferred method for passing a timeout parameter to a helper? Or is there an example that sets timeout in another function and retains some of the convenience of streaming_bulk?

def main():
    rows = updates('documents.json.gz')
    client = Elasticsearch()
    for result in streaming_bulk(client, rows, chunk_size=500, raise_on_error=False):
        print result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions