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..
Hi all, a question regarding synchronization: how can I force the regeneration of data for the `spy_
Hi all,
a question regarding synchronization: how can I force the regeneration of data for the spy_product_abstract_image_storage
table? I tried using console event:trigger -r product_abstract_image
, but that didn't seem to help.
The core issue is that I'm deleting duplicated image assignments from the spy_product_image_set_to_product_image
table via plain SQL (as the query for it is a bit complex for propel) and or course I'd like to synchronize the changes to the FE too. Still, spy_product_abstract_image_storage
still has the old data, with the duplicated images and so FE doesn't get updated correctly. How can I force a recheck of what's actually in the DB and recompilation of data for the storage table according to that?
Comments
-
Isn't it
console publish:trigger-events
?0 -
I don't have anything starting with
publish
in the console commands selection.0 -
I can only tell how it works in Docker. You're probably not using Docker, are you?
0 -
Nope. Vagrant.
0 -
you can also truncate the storage table and run that command again
0 -
Truncating shouldn't be needed actually, but yes, give it a try.
Also check that your Jenkins and RabbitMQ are up and running.0 -
Both are up and running, yes.
However, truncating - or, rather, deleting just the related rows - did help indeed, thanks. 👍
0 -
👍
0 -
If u truncate the table just so and then populate the storage table again with the command u can have the problem that u have still old data in KV Storage...
normally u have in this case try to delete duplicate images with a console command and use the propel entity to delete it or just plain sql and trigger the related events... then everything happend automatically in background..0 -
yes, that would help to unpublish old data
0 -
@UL65CH0MC That's exactly what I want to do. The deletion is being done by a console command I created. However, as mentioned I'm using plain SQL for that, not propel. What do you mean with "related events"? I did trigger
product_abstract_image
(as the images were associated with abstract products) but it didn't do anything until I didn't delete their preexisting storage table entries too (then, however, it worked and KV was ok too)0 -
if you use propel, entity events are triggered that most likely the product image storage is listening to. So, if you delete a record using propel, a delete entity event is emitted, and some listener would call unpublish after that
0 -
@U01A5ARAXP0 Problem with that is that my query is relatively complex, with multiple subselects, postgresql functions and whatnot and it would be very time-consuming to translate it to propel (that's a recurring problem I have... propel should make things easier in theory, but in practice, I can get what I want with plain SQL very quickly, even if the query is more complex, but with propel it takes ages (to put the propel query itself together)).
0 -
With propel delete entity it happened automatically. With plain sql u have to get from sql the ids of products involved in the cleanup process and trigger the event that u mentioned above
0 -
@UL65CH0MC I tried that too (triggering the event specifically for the ids affected), but again, as long as the preexisting storage table entries were left in place, nothing happened, it did not recheck and recompile the data for the table and, consequently, didn't update FE either.
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