最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论