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 there, we're running `oms:check-condition` every minute, but we have some Conditions, that we
Hello there, we're running oms:check-condition
every minute, but we have some Conditions, that we don't want to check every minute, like if an invoice was paid, since this can take a few days and fills the database with a lot of log messages. Is it somehow possible to check certain conditions only say every hour or once a day?
Comments
-
Give your oms command checking for invoice payment a higher timeout, e. g. 12 hours.
oms:check-condition
will still run once a minute, but it shouldn't write something to the database. Afaik, it won't write anything tospy_oms_transition_log
until there really is a transition.0 -
One part of our OMS looks like this:
0 -
And it's logging every minute to the database, source & target are the same
0 -
If you're sure that you don't need these transition logs, you're free to override the logging to skip those logs, that aren't leading to a state change.
0 -
I just wondered if there is already a clean solution for this in place. Like adding a tag to a condition and to the
oms:check-condition
command.<transition happy="true" condition="Heidelpay/IsOrderPaid" condition-tag="daily"> <source>finalizing finished</source> <target>paid</target> </transition>
And a scheduler job that runs once a day and executes:
vendor/bin/console oms:check-condition --tag=daily
0 -
We already plan to keep the database clean, but would be nice to make the process efficient overall.
0 -
How about creating a separate jenkins job that will archive oms transition logs of completed orders and delete them from spy_oms_transition_log? That way your db table size would stop growing indefinitely and you probably needn't care too much of oms checks every minute.
0 -
We plan to do this, I just wondered if there is a more efficient way to run these checks.
0 -
I'd be curious, too.
0 -
If you're going to archive and delete oms transition logs, be aware, that you will lose the ability to view order items' state change history in Zed's order details.
0 -
Sure, we'll only delete duplicate entries that have the same source & target, so this shouldn't be a problem I think.
0 -
In that case I wouldn't archive them afterwards. Instead, I'd change the logging behavior so that those duplicate entries won't be created right away. That way, it also wouldn't increase your auto_increment ids more than needed.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 921 Developer Corner
- 781 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 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