Skip to content
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.

Specify Retention Policy in SeriesHelper  #300

@matt-snider

Description

@matt-snider

It would be good to be able to specify the Retention Policy on a per SeriesHelper basis.

At the moment I'm employing a straight-forward hack:

class MySeriesHelper(SeriesHelper):
     class Meta:
        # ....

     @classmethod
     def commit(cls, client=None):
        # Overwrite this method to add the retention policy. This is a temp
        # hack until this can be applied to upstream.
        if not client:
            client = cls._client
        rtn = client.write_points(cls._json_body_(), retention_policy='my_retention_policy')
        cls._reset_()
        return rtn

I'm not sure if I'm missing something and there is actually a better way to do this. But if not, I think it can be fairly easily implemented by adding a new parameter to Meta.

I'd be interested in working on this if you think it's a worthwhile feature.

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