almenscorner / IntuneCD

Tool to backup, update and document configurations in Intune
MIT License
277 stars 35 forks source link

Update graph_batch.py #171

Closed Wob76 closed 6 months ago

Wob76 commented 7 months ago

My Python is very rusty, but I had a crack at adding a while loop to the retry loop, I added a pool count with a max count set in the variables so it doesn't go forever, it will pop out an error with failed count if it fails.

I also increased the base wait_time to 20s in the handle_responses function.

I reinitialised the retry_pool after the batch_list is created and before the batch is called, this is so it can actually reach 0.

Tests OK on my system, although it recovers very slowly until stop the 2nd instance, as I am overloading the api on purpose, when the 2nd job stops it will recover after a few min

Wob76 commented 6 months ago

Alternative Fix implemented in main