Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

batch_size logic in write_points too soon leaves the loop #102

Copy link
Copy link
Closed
@zzzuzik

Description

@zzzuzik
Issue body actions

Hi,

I might be wrong, thus I'm just asking it here.
I believe, the merge from #20 contains a bug in the return True

        batch_size = kwargs.get('batch_size')
        if batch_size:
            for item in data:
                name = item.get('name')
                columns = item.get('columns')
                point_list = item.get('points')

                for batch in list_chunks(point_list, batch_size):
                    item = [{
                        "points": batch,
                        "name": name,
                        "columns": columns
                    }]
                    self._write_points(
                        data=item,
                        time_precision=time_precision)

                return True

        return self._write_points(data=data, time_precision=time_precision)

If data has more than one item, they are left out

This one has correct logic:
https://github.com/influxdb/influxdb-python/blob/master/influxdb/dataframe_client.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.