shopware6 - Handling long-running Admin API calls within Shopware app lifecycle events - Stack Overflow

I’m using a PHP Symfony server as my app server and calling the Admin API via the Shopware App PHP SDK.

I’m using a PHP Symfony server as my app server and calling the Admin API via the Shopware App PHP SDK. I’ve encountered an issue where API calls to delete or update entities sometimes take longer than the event time frame allows.

Additionally, when the app is deactivated, I lose access to the shop, leading to errors like "not authenticated" or "missing privilege to the entity."

Is there a way to handle such cases or any best practices to manage API calls within lifecycle events?

Thanks in advance for your help!

I’m using a PHP Symfony server as my app server and calling the Admin API via the Shopware App PHP SDK. I’ve encountered an issue where API calls to delete or update entities sometimes take longer than the event time frame allows.

Additionally, when the app is deactivated, I lose access to the shop, leading to errors like "not authenticated" or "missing privilege to the entity."

Is there a way to handle such cases or any best practices to manage API calls within lifecycle events?

Thanks in advance for your help!

Share Improve this question asked Nov 19, 2024 at 15:53 MossMoss 2471 gold badge3 silver badges11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1
  1. There can be many reasons why Shop Servers can become slow and unresponsive. Maybe they are reaching their resource rate-limit, too busy handling other requests .etc. So at your app side, We can only alleviate the above situations by applying timeouts-retries-and-backoff when calling API.

  2. For handling call API when app inactive You should to register a webhook event app.activated/app.deactivated with your app, to determine when your app call or should not call with shop API.

Hope that helps.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742416606a4439864.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信