As the code already has pThrottle, I reused it too to limit the number of requests to 30 every 30 seconds as said on dev.to docs.
Now the code uses pThrottle both to Create and to Update the Article and if the request fails a retry with a max quantity of 3 retries each 1 second of delay is applied.
Could you please review @sinedied? If needed, mention the issue here about 429 too.
Hi, as discussed at issue https://github.com/sinedied/publish-devto/issues/37 I've implemented a Retry + delay for update/create articles here.
As the code already has
pThrottle
, I reused it too to limit the number of requests to 30 every 30 seconds as said ondev.to
docs.Now the code uses
pThrottle
both to Create and to Update the Article and if the request fails a retry with a max quantity of 3 retries each 1 second of delay is applied.Could you please review @sinedied? If needed, mention the issue here about 429 too.