๐ฉ๐ป๐ป/airflow5 ํฌ๋กค๋ง ๊ด๋ฆฌ Airflow vs Celery ๊ฐ์๊ธฐ์กด ํ๋ก์ ํธ์ ํฌ๋กค๋ง ์์คํ ์ Airflow๋ก ๊ด๋ฆฌํ๋ค.Airflow ์ด์ ์ค์ด๋ ์๋ฒ์ ๋ฌธ์ ๊ฐ ๋ง์๋ ๋ฐ, ๊ทธ ์ค์์ ์ ์ผ ํฐ ๋ฌธ์ ๋ cpu ์ ์ ์จ์ด 100์ผ๋ก ์น์์ ๋๊ฐ ๋ง์๋ค๋ ๊ฒ์ด๋ค.Airflow๋ก ์ด์ํ๋ ๊ฒ์ด ๋ง์ด ๋ฌด๊ฒ๊ณ ์ค๋ฒํค๋๊ฐ ํฌ๊ธฐ ๋๋ฌธ์ ์ด๋ฒ์ Airflow๊ฐ ์๋ ๋ค๋ฅธ ๋ฐฉ๋ฒ์ผ๋ก ๊ด๋ฆฌํ ์ ์๋์ง์ ๋ํด ์กฐ์ฌ ๋ฐ ์ ๋ฆฌ๋ฅผ ํด๋ณด๋ ค๊ณ ํ๋ค.ํ์ธAirflow๋ ๋ฐ์ดํฐ ํ์ดํ๋ผ์ธ ๋ฐ ์ํฌํ๋ก์ฐ ๊ด๋ฆฌ์ ์ต์ ํ๋ ๋๊ตฌ์ด๋ค. ํฌ๋กค๋ง ๊ฐ์ ๋จ์ํ ์์ ์ ์คํํ ๋์๋ Celery๊ฐ ๋ ์ ํฉํ๋ค.Airflow์ Celery๋ฅผ ๋น๊ตํด๋ณด๋ฉด ๋น๊ต ํญ๋ชฉCeleryAirflow์ฃผ์ ๋ชฉ์ ๋น๋๊ธฐ ์์ ์คํ (ํ์คํฌ ํ)๋ฐ์ดํฐ ์ํฌํ๋ก์ฐ ๋ฐ ํ์ดํ๋ผ์ธ ๊ด๋ฆฌ์์ ์คํ ๋ฐฉ์๋น ๋ฅธ ์คํ, ๋จ์ํ ์์ ์ฒ๋ฆฌDAG ๊ธฐ๋ฐ,.. 2025. 2. 4. [Airflow] local์์ ๊ฐ๋จํ๊ฒ ์์ํ๊ธฐ ๊ฐ์airflow ๊ด๋ จํด์ ๊ฐ๋จํ๊ฒ ํ ์คํธํ๊ธฐ ์ํด์ ๋ก์ปฌํด์ ์คํํ๋ ๋ฐฉ๋ฒ์ ์ ๋ฆฌํ๋ คํ๋ค์งํStep 1. ๊ฐ์ ํ๊ฒฝํ์ ์ฌํญ์ ์๋์ง๋ง pip ๋ฒ์ ์ผ๋ก ํฌ๊ฒ ๊ณจ์น ์ํ๊ณ ์ถ์ง ์๊ธฐ์ ๋ฌด์กฐ๊ฑด์ ์ผ๋ก set up ํด์ค๋ค# Create a virtual environmentpython3 -m venv airflow-venv# Activate the virtual environmentsource airflow-venv/bin/activate Step 2. Apache Airflow ์ค์นpip์ ์ด์ฉํด์ ์ค์นํด์ค๋ค.AIRFLOW_VERSION=2.5.1PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"CONSTRAINT_URL=".. 2024. 7. 30. [Airflow] airflow ui์์ arguments ์ ๋ฌํ๊ธฐ ๊ฐ์Airflow์ Task๋ค์ ์ค์ผ์ค๋ง์ผ๋ก ๊ด๋ฆฌํ๊ณ ์๋ค.ํ์ง๋ง ๋จ๋ฐ์ฑ์ผ๋ก ์คํ๋์ด์ผํ๋ Task๋ค๋ ์กด์ฌํ๋ค.์ด๊ธฐ ๋ฐ์ดํฐ ์ ์ฌ ํน์ ์ฌ์ ์ฌ ์ด์๋ก ์ธํด..์ด๋ฌํ ๊ฒฝ์ฐ์ Arguments์ ์ ๋ฌํ๊ณ ์ถ์ ๋ ์ด๋ป๊ฒ ํด์ผํ ๊น ์ฐพ์๋ณด์๋ค.์งํBashOperator, PythonOperator ๋๊ฐ์ง ๋ฐฉ๋ฒ์ผ๋ก ํ ์คํธํด๋ณด์๋ค.from datetime import datetime, timedeltafrom airflow import DAGfrom pendulum.tz.timezone import Timezonefrom airflow.operators.bash import BashOperatorfrom airflow.operators.python import PythonOperatorfrom airflow.ope.. 2024. 7. 11. [Airflow] RemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. ๊ฐ์airflow ์ฎ๊ธฐ๋ ์์ ์ค์ error ๋ฐ์RemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. ํ์ธ airflow ์งํ ์ฌํญ์ ์ด๋ฉ์ผ๋ก ๋ฐ๋๋ฐ, ๊ทธ ์ด๋ฉ์ผ ์ธ์ฆ ๊ด๋ จํด์ ์๊ธด ๋ฌธ์ ## docker-compose.yaml# For SMTPAIRFLOW__SMTP__SMTP_HOST: smtp.gmail.comAIRFLOW__SMTP__SMTP_PORT: 587AIRFLOW__SMTP__SMTP_RETRY_LIMIT: 5AIRFLOW__SMTP__S.. 2024. 5. 29. [Airflow] The scheduler does not appear to be running. Last heartbeat was received 7 hours ago.The DAGs list may not update, and new tasks will not be scheduled. ์ ์ด์๋๋ Airflow๊ฐ ๊ฐ์๊ธฐ ๋ฉ์ถ๊ฒ ๊ฐ๋ค๋ ์๊ธฐ๋ฅผ ๋ฃ๊ณ ๋ดค๋๋ ์ฅ ~ ?? ๋ด DAG ๋ค ๋ค ์ค๋๊ฐ ?The scheduler does not appear to be running. Last heartbeat was received 7 hours ago.The DAGs list may not update, and new tasks will not be scheduled. >> ํด์์ค์ผ์ค๋ฌ๊ฐ ์คํ ์ค์ด ์๋ ๊ฒ ๊ฐ์. ๋ง์ง๋ง์ 7์๊ฐ ์ ์ ์์ ๋์์.DAG ๋ชฉ๋ก์ด ์ ๋ฐ์ดํธ๋์ง ์์ ์ ์์ผ๋ฉฐ ์ ์์ ์ด ์์ฝ๋์ง ์์. Airflow ๊ธฐ๋ฅ ์ค์ health ํ์ธํ ์ ์๋ ๋ฐฉ๋ฒ์ด ์์ด์ ํ๋ฒ ์ฌ์ฉํด๋ณด์๋น/health health ํ์ง unhealthy ํ์ง ํ์ธํ ์ ์๋ค. ์ง์ง ์ด์ ๋ memory .. 2024. 3. 8. ์ด์ 1 ๋ค์