Commit 81dd05e5 authored by 김진영's avatar 김진영
Browse files

Update batch_test.py

parent 0c9aab19
...@@ -3,7 +3,7 @@ from textwrap import dedent ...@@ -3,7 +3,7 @@ from textwrap import dedent
import pendulum import pendulum
from airflow.operators.bash import BashOperator from airflow.operators.bash import BashOperator
from airflow import DAG from airflow import DAG
from data/gasan_data import gasanData from data.gasan_data import gasanData
local_tz = pendulum.timezone("Asia/Seoul") local_tz = pendulum.timezone("Asia/Seoul")
...@@ -47,7 +47,7 @@ with DAG( ...@@ -47,7 +47,7 @@ with DAG(
# gasan 작업 병렬처리 # gasan 작업 병렬처리
post_gasan_tasks = [] post_gasan_tasks = []
for i, data in enumerate(gasan_data): for i, data in enumerate(gasanData):
post_gasan_task = BashOperator( post_gasan_task = BashOperator(
task_id='post_gasan'+str(i+1), task_id='post_gasan'+str(i+1),
bash_command="curl -X \'POST\' \'http://10.231.238.224:30999/api/v1/camera/writeimage\' -H \'Content-Type: application/json\' -d \'{\"id\": \"test\", \"pw\": \"test\", \"ip\": \"%s\", \"serialNum\": \"%s\", \"camName\": \"%s\"}\'" %(data["ip"], data["serialNum"], data["camName"]), bash_command="curl -X \'POST\' \'http://10.231.238.224:30999/api/v1/camera/writeimage\' -H \'Content-Type: application/json\' -d \'{\"id\": \"test\", \"pw\": \"test\", \"ip\": \"%s\", \"serialNum\": \"%s\", \"camName\": \"%s\"}\'" %(data["ip"], data["serialNum"], data["camName"]),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment