ProductOpener::Redis - functions to integrate with redis
ProductOpener::Redis
is handling pushing info to Redis to communicate updates to all services,
including search-a-licious,
as well as receiving updates from other services like Keycloak.
The connection to redis
init $redis_client or re-init it if we where disconnected
it is uses ProductOpener::Config2::redis_url
Subscribe to redis stream to be informed about user deletions.
Add an event to Redis stream to inform that a product was updated.
The product that was updated.
The changes, structured as per product change history
The action that was performed on the product (either "updated" or "deleted"). A product creation is considered as an update.
Add an event to Redis stream to notify that OCR was run on an image and that the OCR result (gzipped JSON file) is ready to be used.
The product code associated with the image.
The ID of the image.
The URL where the OCR result JSON file can be found.
Return the number of requests performed by the given user for the current minute for the given rate-limit bucket. See https://redis.com/glossary/rate-limiting/ for more information.
If the rate-limiter is not configured or if an error occurs, returns undef.
The IP address of the user who is making the request.
The rate-limit bucket that is being requested.
Increment the number of requests according to the Redis rate-limiter for the current minute for the given user and bucket. The expiration of the counter is set to 59 seconds. See https://redis.com/glossary/rate-limiting/ for more information.
The IP address of the user who is making the request.
The rate-limit bucket that is being requested.