You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
☢️
Feeling radiant 😎
Filip Sobalski
pinkeen
☢️
Feeling radiant 😎
All things science, tech, people. Solving problems as a programmer, server guy and photographer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Helper scripts for Magento Commerce Cloud prod/stage envs
Magento Cloud helper scripts
I drop them into the root project's dir and push them to the repo.
Mostly they should use whatever env you've got checked out with magento-cloud command.
Tested only on Mac with Pro/Stage envs, use at your own risk YMMV.
Tip: You can adjust .gitignore like this for convenience:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Elasticsuite synonimization feature (thesaurus) works like this:
For each synonimized keyword in user's search query and each synonym configured for this keyword add a match condition to the elasticsearch query that has the keyword string replaced with synonym.
For multiple synonymized keywords appearing in user's search query this will produce a separate match condition for each combination of each synonym of each keyword.
This means that the resulting elasticsearch query will basically grow geometrically with the number of synonymized keywords present in user's query as the number of conditions is roughly (keyword count)^(average number of synonyms).
What client did is they've configured a bunch of keywords with 40-80 synonyms each one. When somebody entered a search query that had 3 of them elasticsuite would produce an elasticsearch query (the raw JSON) that weighed ~1GB (sic!).
Of course elasticsearch would fail to parse such query
Patch Magento AMQP framework to prevent RabbitMQ blowing up with consumer jobs that require long processing
Patch Magento AMQP framework to prevent RabbitMQ blowing up with consumer jobs that require long processing
Rationale
The default AMQP settings have unlimited prefetch count - this means that the server will continue sending
messages to the consumer as quickly as it can regardless of whether the client is actually reading the messages.
When consumer worker is processing a long running job it's not reading the socket, while RMQ is still sending -
this causes the TCP buffer to be overflown and the connection dropped before the original job even had the chance
of finishing, this has major stability implications:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test for getting a violation error name from symfony validator's ConstraintViolation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters