Shopify / shopify-api-php

MIT License
371 stars 171 forks source link

All requests should have the option to pass $tries #203

Open MagicLegend opened 2 years ago

MagicLegend commented 2 years ago

Overview/summary

Currently the abstract API calls will not handle rate limiting because $tries is not passed on here: https://github.com/Shopify/shopify-api-php/blob/582252eaedb2bb6828bb2d02238e14010d79a2e3/src/Rest/Base.php#L173-L186

Thus $maxTries will default to 1: https://github.com/Shopify/shopify-api-php/blob/582252eaedb2bb6828bb2d02238e14010d79a2e3/src/Clients/Http.php#L150

Motivation

We ran into rate limiting issues that weren't handled by the library.

Possible solution

In Base.php it should take apart the $params array and take out a tries value from there, to pass it on to the appropriate function. Another solution would be to simply add an optional parameter up the chain, but that would involve changing every function in this library.


Checklist

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 1 year ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 1 year ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 1 year ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 1 year ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 1 year ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 1 year ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 10 months ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 8 months ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 6 months ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 4 months ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

MagicLegend commented 2 months ago

Yeah, and why is it stale bot? Because Shopify doesn't reply ;)

paulomarg commented 2 weeks ago

Hey, sorry for not responding to this before. We removed stalebot from this repo, and I'm adding this to our tracking so we can investigate it.

Thank your for your patience here!