-
Notifications
You must be signed in to change notification settings - Fork 0
chore: CATALOG-11541 Use catalog changes in fork repo #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aaeb848
to
290b04e
Compare
protected static function getReadWriteTimeoutFromConfig(AMQPConnectionConfig $connectionConfig, array $config): void | ||
{ | ||
$readTimeout = Arr::get($config, self::CONFIG_OPTIONS.'.read_timeout'); | ||
$writeTimeout = Arr::get($config, self::CONFIG_OPTIONS.'.write_timeout'); | ||
|
||
if (is_numeric($readTimeout) && intval($readTimeout) > 0) { | ||
$connectionConfig->setReadTimeout((int) $readTimeout); | ||
} | ||
|
||
if (is_numeric($writeTimeout) && intval($writeTimeout) > 0) { | ||
$connectionConfig->setWriteTimeout((int) $readTimeout); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I get right, this config is the only reason of switching to fork. Isn't it?
Is it possible to use custom connection class in sake of using original vendor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried do that in previous ticket but unsuccessful because of changing Connection config class instead of Connection class. And we decided to use fork for that.
$readTimeout = Arr::get($config, self::CONFIG_OPTIONS.'.read_timeout'); | ||
$writeTimeout = Arr::get($config, self::CONFIG_OPTIONS.'.write_timeout'); | ||
|
||
if (is_numeric($readTimeout) && intval($readTimeout) > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (is_numeric($readTimeout) && intval($readTimeout) > 0) { | |
$readTtl = is_numeric($readTimeout) ? (int)readTimeout : 0; | |
if ($readTtl > 0) { |
🍹 cast only once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -99,4 +100,18 @@ protected static function getNetworkProtocolFromConfig(AMQPConnectionConfig $con | |||
$connectionConfig->setNetworkProtocol($networkProtocol); | |||
} | |||
} | |||
|
|||
protected static function getReadWriteTimeoutFromConfig(AMQPConnectionConfig $connectionConfig, array $config): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add tests 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Jira: CATALOG-11541
What/Why?
Use catalog changes in fork repo.
Cherry-picked all commits from previous repo: https://github.com/bc-ochkovskyi/laravel-queue-rabbitmq
Rollout/Rollback
Revert PR.
Testing
By unit tests:

In cat-imex service: https://github.com/bigcommerce/catalog-import-export/pull/568
In orchestrator-imex service: https://github.com/bigcommerce/import-export-service/pull/173