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 Team if we save the data in storage table then with the help of queue, data is automatically push
HI Team
if we save the data in storage table then with the help of queue, data is automatically pushed to redis
please let me know is there any way to do opposite
if i will delete the data from storage table, will it delete data from redis?
in my case it is not happening
Can you please help in same
Comments
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
Heyhey, since the data-synching from the storage table to redis is done through a so called “behavior” in propel it is important HOW you delete the data.
if you use some ootb Pub&Sync from the demoshop then you must not delete directly in the database but use propel and then the removal should also be synched to redis.
0 -
I have used following schema file to create storage file:
<?xml version="1.0"?> <database xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" name="zed" xsi:noNamespaceSchemaLocation="<http://static.spryker.com/schema-01.xsd>" namespace="Orm\Zed\Config\Persistence" package="src.Orm.Zed.Config.Persistence"> <table name="pyz_config_storage" idMethod="native" allowPkInsert="true" phpName="PyzConfigStorage" identifierQuoting="true"> <column name="id_pyz_config_storage" required="true" type="INTEGER" primaryKey="true" autoIncrement="true" /> <column name="fk_lookup_key" required="true" type="VARCHAR" size="255" /> <foreign-key foreignTable="pyz_config"> <reference local="fk_lookup_key" foreign="lookup_key" /> </foreign-key> <behavior name="synchronization"> <parameter name="resource" value="config" /> <parameter name="key_suffix_column" value="fk_lookup_key" /> <parameter name="queue_group" value="sync.storage.pyz_config" /> </behavior> <behavior name="timestampable" /> <id-method-parameter value="pyz_config_storage_pk_seq" /> </table> </database>
and then deleting using following code:
$isConfigStorage = $this->getFactory()->createPyzConfigStorageQuery() ->filterByFkLookupKey($configKey) ->delete();
this is deleting from storage table but not from redis.
0 -
Can you please let me know what i am missing
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
On the first look it seems to be fine. Have you checked if there is any new message in the queue “sync.storage.pyz_config” once you delete it? The best would be to disable the scheduler for this for the moment with
docker/sdk console scheduler:suspend
if this does not help then i can not help more without debugging by myself.
0 -
no new message in the queue after deletion
I have specified events like this:public const ENTITY_PYZ_CONFIG_CREATE = 'Entity.pyz_config.create'; public const ENTITY_PYZ_CONFIG_UPDATE = 'Entity.pyz_config.update'; public const ENTITY_PYZ_CONFIG_DELETE = 'Entity.pyz_config.delete';
it is not getting listened in the listener.
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