Skip to content

Commit

Permalink
fix: use a different redis stream depending on the project (#9725)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 authored Feb 1, 2024
1 parent dc04d18 commit cdcdf05
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/ProductOpener/Config_obf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,7 @@ $options{other_servers} = {

$options{no_nutrition_table} = 1;

# Name of the Redis stream to which product updates are published
$options{redis_stream_name} = "product_updates_obf";

1;
3 changes: 3 additions & 0 deletions lib/ProductOpener/Config_off.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,9 @@ $options{other_servers} = {
}
};

# Name of the Redis stream to which product updates are published
$options{redis_stream_name} = "product_updates_off";

# used to rename texts and to redirect to the new name
$options{redirect_texts} = {
"en/nova-groups-for-food-processing" => "nova",
Expand Down
3 changes: 3 additions & 0 deletions lib/ProductOpener/Config_opf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,7 @@ $options{other_servers} = {

$options{no_nutrition_table} = 1;

# Name of the Redis stream to which product updates are published
$options{redis_stream_name} = "product_updates_opf";

1;
3 changes: 3 additions & 0 deletions lib/ProductOpener/Config_opff.pm
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,7 @@ $options{other_servers} = {
}
};

# Name of the Redis stream to which product updates are published
$options{redis_stream_name} = "product_updates_opff";

1;
2 changes: 1 addition & 1 deletion lib/ProductOpener/Redis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ sub push_to_redis_stream ($user_id, $product_ref, $action, $comment, $diffs) {
eval {
$redis_client->xadd(
# name of the Redis stream
'product_update',
$options{redis_stream_name},
# We do not add a MAXLEN
'MAXLEN', '~', '10000000',
# We let Redis generate the id
Expand Down

0 comments on commit cdcdf05

Please sign in to comment.