Shopify / shopify-api-php

MIT License
396 stars 174 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 2 years 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 2 years ago

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

github-actions[bot] commented 2 years 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 years 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 11 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 11 months ago

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

github-actions[bot] commented 9 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 9 months ago

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

github-actions[bot] commented 7 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 7 months ago

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

github-actions[bot] commented 5 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 5 months ago

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

paulomarg commented 3 months 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!