Wait X minutes before next check? #1326
Replies: 7 comments
-
Hi, I also would like to limit the number of watches being checked simultaneously. At the moment it runs 10 watches at a time, but I cannot find where to set this limit? I tried the MAX_QUEUE_LENGTH (set it to 1 and to 100), but that does not make a difference. I also changed the "MAX_CONCURRENT_SESSIONS" playwright-chrome setting to 1, but it still performs 10 checks at once. I would love to have the watches checked every 15 minutes, but with only one watch being checked at the same time. Is this possible in any way? |
Beta Was this translation helpful? Give feedback.
-
Still haven't found a way to do this. The problem is that when there are too many concurrent connections to the website I am monitoring, access is blocked for some time. There is no problem when all the watches are run in immediate succession. I now manually start the watches (fortunately no more than 20) and wait for the previous watch to finish before starting another one. But if I need to restart my server for some reason, I have to do this manual process again. I hope there is a setting that solves this. |
Beta Was this translation helpful? Give feedback.
-
Hello @robbedenys have you find a solution? I'm searching to solve the same exact problem |
Beta Was this translation helpful? Give feedback.
-
Yes, I have found a solution that works quite good. I am using a home assistant automation that runs all the watches one after another. I created this python script that runs within home assistant:
you should replace YOURAPIKEY and IPANDPORT with your own API key and the IP and PORT of your own installation. Then in home assistant I made a numeric entity that keeps track of the total number of watches that has a specific tag (in my case "enabled") that gets filled in by the python script. This is the yaml code of my automation:
All my changedetection watches are paused and i force check them with the python script. It works fine for more than a year already :-) When you add a watch the next time the automation is triggered it will automatically also check it, so once it is running you don't have to think about it anymore.. |
Beta Was this translation helpful? Give feedback.
-
@robbedenys very interesting, thanks! How many links do you have on a single website? because i have around 6500 |
Beta Was this translation helpful? Give feedback.
-
Oh wow, I have around 50.. |
Beta Was this translation helpful? Give feedback.
-
change - FETCH_WORKERS=10 to - FETCH_WORKERS=1 in docker-compose.yml to make change detection check one at a time. |
Beta Was this translation helpful? Give feedback.
-
I want to set a number of watches at 5-minute intervals but make it so that after one is finished checking another cannot be run for a specified delay. For example, if watch #1 is currently processing and watch #2 is in queue, I would like to wait a minute after watch #1 is finished before watch #2 is processed. Is this currently possible?
I did find the environment variable MAX_QUEUE_LENGTH which I could set to 1 but that will result in a longer delay that I would like.
Beta Was this translation helpful? Give feedback.
All reactions