RWTH-EBC / FiLiP

FIWARE Library for Python (FiLiP) to work with FIWARE API
BSD 3-Clause "New" or "Revised" License
23 stars 14 forks source link

Throttling=0 is not working when posting a subscription #148

Closed StWiemann closed 2 years ago

StWiemann commented 2 years ago

Describe the bug When creating a subscription with ql_client.post_subscription() a value < 1 is not accepted. This leads to a throttling of min. 1.

To Reproduce Steps to reproduce the behavior:

  1. e.g. "TimeSeries Data with QL"-Example. Only two isntead of six values will end up in the DB.

Expected behavior Throttling 0 should be possible to allow data-collection sub 1s.

This is a bug in the quantumleap-client. Function "post_subscription" in Line 211.

if throttling will evaluate to false when using "0". Also, I think the following if-statement should be if throttling <0.

I can do a PR for this or you just fix this with the next push :)

Cheers

tstorek commented 2 years ago

@StWiemann thank you for raising an issue about this. Hope you enjoy the library so far. Actually, I did never use this function myself since I usually use the advanced subscription mechanism in the context broker. Please, feel free to create a PR. I will assign this to you. Please keep in mind that the branch will be created automatically.

Additionally, please keep in mind to double-check quantum leap docs on this and write a simple test case.

Thank you very much!

github-actions[bot] commented 2 years ago

Branch 148-Throttling=0-is-not-working-when-posting-a-subscription created!