[LIB-820] add time.sleep in some places to avoid throttling when migrating the data;#36
[LIB-820] add time.sleep in some places to avoid throttling when migrating the data;#36opalczynski merged 3 commits intodevelopfrom
Conversation
| objects_to_add.append(batched_syncano_object) | ||
| parse_ids.append(data_object['objectId']) | ||
|
|
||
| time.sleep(6) # avoid throttling; |
There was a problem hiding this comment.
6? Why when we have only rate limit per second?
There was a problem hiding this comment.
Hmm, because the batch make 10 creates/updates 60/10 = 6 - or am I bad at math? :)
There was a problem hiding this comment.
But we only have limits per second. So every second it's a fresh limit. So time.sleep(1) should always "refresh" it. And this way it will be only possible to run into rate limit when we use more than 60 calls before sleeping
|
Maybe we could add some support for |
|
@23doors it's nice! I will create a task for that and handle it in next or next next sprint. |
|
@23doors I will merge that for now and in few weeks when add retry to python LIB - will change the logic here. Is this ok? |
|
Sure! fine with me :) |
No description provided.