โ Flower ?
Flower๋ Celery cluster๋ฅผ ๋ชจ๋ํฐ๋งํ๊ณ ๊ด๋ฆฌํ๊ธฐ ์ํ web ๊ธฐ๋ฐ tool์ด๋ค.
1๏ธโฃ ์์
celery์ task๋ฅผ ํ์ธํด์ผ ํ๋, ์๋ ๋งํฌ๋ฅผ ํตํด celery๋ฅผ ์คํํ๋ค.
[Celery] Celery with Redis (python) : ๋น๋๊ธฐ ์์ queue
โ Celery ? celery๋ ๋ถ์ฐ ๋ฉ์์ง ์ ๋ฌ์ ๊ธฐ๋ฐ์ ๋ ์คํ ์์ค ๋น๋๊ธฐ ํ ์คํฌ ํ, ์ก ํ์ด๋ค. ์ค์ผ์ค๋ง์ ์ง์ํ์ง๋ง ์ค์๊ฐ ์ด์์ ์ด์ ์ ๋๊ณ ์๋ค. 1๏ธโฃ ์์ redis๊ฐ ์คํ๋์ด ์์ด์ผ ํ๋ค. (์๋
bonory.tistory.com
2๏ธโฃ ์คํ
celery๊ฐ ์ค์น๋์ด ์๊ณ , ์คํ ๊ฐ๋ฅํ ํ๊ฒฝ์ด๋ฉด ๋ณ๋์ ์ค์น์์ด ์๋์ ๋ช ๋ น์ด๋ก ๋ฐ๋ก ์ฌ์ฉ ๊ฐ๋ฅํ๋ค.
python3 -m celery -A [application name!!!] flower --address=localhost --port=5555
๐ ์ฌ๊ธฐ์ ์ ์ํ ์ ์ celery๋ฅผ ์คํ์ํจ ์์น์์ ๋์ผํ ๊ฒฝ๋ก์ application name์ผ๋ก flower๋ฅผ ์คํ์์ผ์ผ ํ๋ค.
# celery ์คํ ๋ช
๋ น์ด
python3 -m celery -A app.celery_task.test worker -Q default --loglevel=info --concurrency=1
# flower ์คํ ๋ช
๋ น์ด
python3 -m celery -A app.celery_task.test flower --address=localhost --port=5555
3๏ธโฃ ์คํ ํ์ธ
์ ์์ ์ผ๋ก ์คํ๋๋ฉด ๋ค์๊ณผ ๊ฐ์ด ํ์ธํ ์ ์๋ค.
(application name์ ๊ธ์ด์ด๊ฐ ์ง์ ์งํํ๋ ์์ ์ด๋ ๋ชจ๋ฅธ์ฒ ๋ฐ๋..^^)
4๏ธโฃ flower web ์ ์
localhost:5555
์คํ์ํจ flower web์ ์ ์ํ์ฌ ๋ชจ๋ํฐ๋งํ ์ ์๋ค
Tasks ํญ์ผ๋ก ์ด๋ํ๋ฉด task์ ์์ธ ์ ๋ณด๋ฅผ ํ์ธํ ์ ์๋ค.
โ๏ธ Flower 1.0.1 documentation
Flower - Celery monitoring tool — Flower 1.0.1 documentation
flower.readthedocs.io
'๐ database' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[MQTT] message๋ฅผ ์๋ณด๋ด๋๋ฐ ๊ณ์ message๊ฐ ์์ด๋ issue (1) | 2024.03.07 |
---|---|
[MQTT] mqtt client์ connect ์๋๋ ๋ฌธ์ (0) | 2024.03.06 |
[Redis] Redis์ ๋ํ ๊ฐ๋จํ ์ ๋ฆฌ (0) | 2023.12.04 |
[Celery] Celery with Redis (python) : ๋น๋๊ธฐ ์์ queue (0) | 2022.06.06 |
[Redis] redis๋ฅผ ์์ํ๋ ๊ฐ๋จํ ๋ฐฉ๋ฒ 2๊ฐ์ง (docker/source download) (0) | 2022.06.06 |