@@ -376,6 +376,75 @@ The Task Component automatically generated from the above JSON is as follows:
376376
377377</details >
378378
379+ ## SMTP
380+
381+ ### 1. Add SMTP info
382+ file path : /_ airflow/docker-compose.yml
383+
384+ modify docker-compose.yml file and enter your smtp info.
385+
386+ gmail example : https://support.google.com/a/answer/176600?hl=en
387+
388+
389+ ```
390+ ...
391+ airflow-server:
392+ environment:
393+ AIRFLOW__SMTP__SMTP_HOST: 'smtp.gmail.com'
394+ AIRFLOW__SMTP__SMTP_USER: '[email protected] ' 395+ AIRFLOW__SMTP__SMTP_PASSWORD: 'wtknvaprkkwyaurd'
396+ AIRFLOW__SMTP__SMTP_PORT: 587
397+ AIRFLOW__SMTP__SMTP_MAIL_FROM: '[email protected] ' 398+ ...
399+ ```
400+ ### 2. Modify mail.py
401+ file path : /_ airflow/airflow-home/dags/mail.py
402+
403+ Modify the recipient's email address in the email_task.
404+
405+ ```
406+ ...
407+ email_task = EmailOperator(
408+ task_id='send_email',
409+ 410+ subject='DAG 상태 보고서',
411+ ...
412+ )
413+ ...
414+ ```
415+
416+ ### 3. Add taskComponent
417+ Add trigger_email task component at the bottom of the workflow to receive email alarms.
418+
419+ ```
420+ ...
421+ {
422+ "name": "trigger_email",
423+ "task_component": "trigger_email",
424+ "request_body": "",
425+ "path_params": {},
426+ "dependencies": [
427+ "{$Pre_taskName}"
428+ ]
429+ }
430+
431+ ...
432+ ```
433+
434+ ## GET task log
435+ ### 1. GET workflow RunId
436+ [ GET] /workflow/{wfId}/runs
437+ ![ image] ( https://github.com/user-attachments/assets/27fbaf5f-c52d-4d04-b599-ef2eac9e76de )
438+
439+ ### 2. GET taskId and task_Try_Num
440+ [ GET] /workflow/{wfId}/workflowRun/{wfRunId}/taskInstances
441+ ![ image] ( https://github.com/user-attachments/assets/d893cc1a-2cbd-417c-a19d-a650aaca7f6e )
442+
443+ ### 3. GET execution task log
444+ [ GET] /workflow/{wfId}/workflowRun/{wfRunId}/task/{taskId}/taskTryNum/{taskTyNum}/logs
445+ ![ image] ( https://github.com/user-attachments/assets/347babf5-df32-4fe0-82e0-f0e111c333d1 )
446+
447+
379448## Health-check
380449
381450Check if CM-Cicada is running
0 commit comments