influxdb-client-python
influxdb-client-python copied to clipboard
fix: creating `Tasks` with `import` statements
Closes #490
Proposed Changes
Fixed creating Task with import statement:
task_flux = 'import "http"\n\n' \
'from(bucket: "iot_center")\n' \
' |> range(start: -30d)\n' \
' |> filter(fn: (r) => r._measurement == "environment")\n' \
' |> aggregateWindow(every: 1h, fn: mean)'
task = self.tasks_api.create_task_cron("my-name", task_flux, "10 0 * * * *", self.organization.id)
Checklist
- [x] CHANGELOG.md updated
- [x] Rebased/mergeable
- [x] A test has been added if appropriate
- [x]
pytest testscompletes successfully - [x] Commit messages are conventional
- [x] Sign CLA (if not already signed)
Codecov Report
Merging #491 (b5b6e44) into master (aa0f9a5) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## master #491 +/- ##
=======================================
Coverage 90.52% 90.52%
=======================================
Files 39 39
Lines 3355 3355
=======================================
Hits 3037 3037
Misses 318 318
| Impacted Files | Coverage Δ | |
|---|---|---|
| influxdb_client/client/tasks_api.py | 92.39% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
The task option is now appended at the end of script. @rhajek, @powersj can you review the changes again?