Skip to content
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

Task is ignored #1361

Open
iegorval opened this issue Mar 25, 2024 · 0 comments
Open

Task is ignored #1361

iegorval opened this issue Mar 25, 2024 · 0 comments
Labels

Comments

@iegorval
Copy link

Describe the bug
When my Celery task finishes extremely fast (eg. checks that configuration file is missing and stops execution immediately), the corresponding task is not shown in Flower at all despite being visible in logs.

To Reproduce
Run any Celery task that finishes immediately through Docker-compose setup:


version: "3.8"

services:
  worker:
    build: 
      context: . 
      dockerfile: Dockerfile
    network_mode: host
    environment:
      - C_FORCE_ROOT="true"
    ports:
      - 8001:8000
    volumes:
      - ./:/app
    command: ['celery', '-A',  'app.src.backend.worker', 'worker', '-l', 'info']
    depends_on:
      - rabbitmq
      - redis 

  flower:
    image: mher/flower:2.0
    command: ['celery', '--broker=amqp://user:password@rabbitmq:5672/', 'flower']
    environment:
      - FLOWER_PORT=5555
      - FLOWER_PERSISTENT=True
      - FLOWER_STATE_SAVE_INTERVAL=10000

    ports:
      - 5555:5555
    volumes:
      - /usr/local/flower:/etc/flower
    depends_on:
      - rabbitmq
      - redis 
      - worker
      - app
    
  app: 
    build:
      context: . 
      dockerfile: Dockerfile 
    command: ['python', 'run.py']
    volumes:
      - ./:/app
    depends_on: 
      - rabbitmq 
      - redis 

  rabbitmq:
    image: rabbitmq:3-management
    hostname: rabbitmq
    ports:
      - 5672:5672 
      - 15672:15672
    environment:
      - RABBITMQ_DEFAULT_USER=user
      - RABBITMQ_DEFAULT_PASS=password
      - RABBITMQ_DEFAULT_VHOST=/
      - CELERY_BROKER_URL=amqp://user:password@rabbitmq:5672
    depends_on:
      - redis

  redis:
    image: redis:latest
    hostname: redis
    ports:
      - 6379:6379

Expected behavior
I expect to see task as failed in Flower.

Screenshots
task

In attached image, you can see task failing with exception in logs. This task is not in Flower at any moment. Not as active/failed/passed.

System information

kombu==5.1.0
amqp==5.1.1
celery==5.1.2

Rest seen from docker-compose.

@iegorval iegorval added the bug label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant