What are the Slack Archives?
Itโs a history of our time together in the Slack Community! Thereโs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonโt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello, I need to label lot of products. I used Spryker's label feature and added `ProductLabelRelati
Hello, I need to label lot of products. I used Spryker's label feature and added ProductLabelRelationUpdaterPluginInterface
, but it's launched every minute and this can be a bit problematic with big amount of products. Does Spryker have other possibility to add/remove label on product save?
Comments
-
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
Hi, how much products do u have? and how much do u think have to be labeled in average?
0 -
few thousands (with inactive products), but later it can increase
0 -
I'm thinking about using
ProductAbstractPluginUpdateInterface
, but looks likeProductLabelRelationUpdaterPluginInterface
is "spryker way"0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
Ok, it is not a problem with standard code/beahviour from spryker..
we have ca. 3 Mio and we have just a couple of optimization (with spryker together) and everything is works fine..The job take max. 1 min to terminate our job calculation..
0 -
hmm could you tell, which optimizations have you done? ๐
0 -
i mean for now it works ok, but i'm little worried, because
ProductLabelRelationUpdaterPluginInterface
is launched by cron (jenkins) every minute0 -
giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐ง๐ปโ๐ - Cadet
of course... we have a lot of product discontinued and it was a bottleneck performance problem and also memory allocation problem..
We have in
\Pyz\Zed\ProductDiscontinuedProductLabelConnector\Persistence\ProductDiscontinuedProductLabelConnectorRepository::getProductAbstractIdsToBeLabeled
the function in pyz level overrided so: (there are no other possibilities than plain query due limitation of propel)/** * @module Product * @module ProductDiscontinued * * @return int[] */ public function getProductAbstractIdsToBeLabeled(): array { $productAbstractWithNotDiscontinuedProductConcreteSubQuery = ' SELECT ' . SpyProductTableMap::COL_FK_PRODUCT_ABSTRACT . ' FROM ' . SpyProductTableMap::TABLE_NAME . ' LEFT JOIN ' . SpyProductDiscontinuedTableMap::TABLE_NAME . ' ON (' . SpyProductTableMap::COL_ID_PRODUCT . ' = ' . SpyProductDiscontinuedTableMap::COL_FK_PRODUCT . ') WHERE ' . SpyProductDiscontinuedTableMap::COL_ID_PRODUCT_DISCONTINUED . ' IS NULL'; return $this->getFactory() ->getProductPropelQuery() ->where(SpyProductTableMap::COL_FK_PRODUCT_ABSTRACT . ' NOT IN (' . $productAbstractWithNotDiscontinuedProductConcreteSubQuery . ')') ->distinct() ->select([SpyProductTableMap::COL_FK_PRODUCT_ABSTRACT]) ->find() ->toArray(); }
This is just a patch that we applied on pyz level and it works very good.
0 -
will check this. Thanks ๐
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K ๐ Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random