Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Specify Retention Policy in SeriesHelper #300

Closed
matt-snider opened this issue Feb 24, 2016 · 1 comment
Closed

Specify Retention Policy in SeriesHelper #300

matt-snider opened this issue Feb 24, 2016 · 1 comment

Comments

@matt-snider
Copy link
Contributor

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.

@sebito91
Copy link
Contributor

Addressed in #723

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants