skip to Main Content

Redis – How to run celery-beat task under decorator?

I have "locker" decorator: def lock_task(func): def wrapper(*args, **kwargs): if redis.set(func.__name__, 'lock', nx=True): try: result = func(*args, **kwargs) finally: redis.delete(func.__name__) return result or True else: return 'Skipped' return wrapper Also I have celery-task with my decorator: @celery_app.task @lock_task def test():…

VIEW QUESTION

Redis – ClassNotFoundException while JedisClient initialization in Spring Boot 2.5.4 application

I have a Spring Boot 2.5.4 application in which I would like to add Redis and access it via Spring Data Redis. My current configuration looks like this: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId>…

VIEW QUESTION
Back To Top
Search