-
Notifications
You must be signed in to change notification settings - Fork 23
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
"You can only submit max 100 commands pr. sync operation. Please split them up in smaller chunks" #34
Comments
Hm, that's indeed strange. I'll give it a look too this weekend. Looks like the API key has some issues when passed to the sync API. |
I was not able to recreate the issue, so I've added a few additional debug logs and pushed it to a new branch '34_extra_logs'. Could you please run this version with the --debug flag on, and send me a copy with the sensitive information removed? I'm only interested in the last part where it caches the sync API errors. |
Many thanks. Looks like it could be a limit issue?
|
Hey @Hoffelhas Just checking in, if you have any thoughts on this one? Many thanks! |
Dug a little into this, as I understand, the following is the code that sends the batched requests off and is what will fail if there are more than 100.
Many people will not hit this, but as I have quite a lot of tasks and not been able to use autodoist for some time, there are now too many requests to send Having a look to see if I can figure out how to only send 100 at a time and will contribute back if I manage it! Found code on splitting lists into chunks, but not fully sure how to integrate with these lines without making a mess |
Hi there, sorry it took a while for me to respond. Todoist indeed got quite a bit stricter with the max. amount of syncs you're allowed to send in a given period. Basically the documentation says the following:
When adding new single items over time, it's indeed difficult to reach these numbers. However if you have a project with >100 items, and you would activate or change labelling on the project level, then you indeed would get a batch that's too big. However, you're thinking in the right direction; it should then be split up in multiple batches with max. 100. This should be relatively simple: when we enter the 'if api.queue' at line 1523, we have to check if api.queue>100, if so, split it up and run each block separately through sync(api) currently at line 1524. However do note that if you reach the 450 changes within 15 minutes, then Todoist will hard block your connection. So even if we implement this work-around, you should not label and un-label your project with >100 items more than a few times per hour. |
Yes, I saw that other limitation. I don't think that would really be an issue normally, even the 100 commands per request is a bit unique to initial syncs I think, or as you say, large parallel processed projects Appreciate the reply! |
OK, I've come up with:
But I don't think the last line is right, doesn't work when testing at least anyway. Looks like it needs to be "sync(api)", but needs to be called on the list batch Will keep trying anyway! |
I've done something similar to moorsey on my own project:
It's not isolated enough to be pasted into autodoist unfortunately, but it might give clues to someone in the thread. It does work. I hit the limit often when hiding / unhiding large projects with autotagging. |
Just put some code together for this also. Disclaimer, had help from my friend Google Bard on this. We muddled our way through together! First pull request after being on the internet for some time, hoping @Hoffelhas is well and able to look through the other contributions soon Hoping to get my GTD game back in order after a few years lost in the ocean, now hopefully have my next action labelling back! Adding "learn python" to my projects list! |
Getting the following when running
The text was updated successfully, but these errors were encountered: