Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for timezone in SignalFlow execution #113

Closed
hubertgrzeskowiak opened this issue Dec 11, 2020 · 3 comments · Fixed by #114
Closed

Support for timezone in SignalFlow execution #113

hubertgrzeskowiak opened this issue Dec 11, 2020 · 3 comments · Fixed by #114

Comments

@hubertgrzeskowiak
Copy link

https://dev.splunk.com/observability/reference/api/signalflow/latest#endpoint-start-signalflow-computation

SignalFlow execute endpoint supports setting a timezone, which is very relevant when aggregating by days, weeks, etc.

It would be great if the library also supported that.

@hubertgrzeskowiak
Copy link
Author

Workaround I am using:

flow = sfx.signalflow(TOKEN)

def _get_params(**kwargs):
    kwargs["timezone"] = "Australia/Sydney"
    return dict((k, v) for k, v in kwargs.items() if v is not None)

flow._get_params = _get_params
flow.execute(...)

@hubertgrzeskowiak
Copy link
Author

For this fix I reckon it would be enough to add another param timezone to execute.

@mpetazzoni
Copy link
Contributor

@hubertgrzeskowiak indeed; would you be able to send a PR for this? Thanks!

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

Successfully merging a pull request may close this issue.

2 participants