优化包安装
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
##### 1. 依赖安装
|
##### 1. 依赖安装
|
||||||
|
./install.sh
|
||||||
|
或
|
||||||
pip install -r requirements.txt -i https://repo.fangjia.com/repository/pypi-public/simple/
|
pip install -r requirements.txt -i https://repo.fangjia.com/repository/pypi-public/simple/
|
||||||
|
|
||||||
##### 2. 具体业务逻辑
|
##### 2. 具体业务逻辑
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ def find_around_by_location(city, location):
|
|||||||
|
|
||||||
|
|
||||||
def deal(city, lng, lat):
|
def deal(city, lng, lat):
|
||||||
print('开始查找' + city + '周边银行')
|
|
||||||
if lng != None:
|
if lng != None:
|
||||||
location = [lng, lat]
|
location = [lng, lat]
|
||||||
bank_df = find_around_by_location(city, location)
|
bank_df = find_around_by_location(city, location)
|
||||||
@@ -84,6 +83,7 @@ def deal(city, lng, lat):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
print('开始查找' + city + '周边银行')
|
||||||
seaweed_df['bank'] = seaweed_df.apply(lambda x: deal(x['city'], x['lng'], x['lat']), axis=1)
|
seaweed_df['bank'] = seaweed_df.apply(lambda x: deal(x['city'], x['lng'], x['lat']), axis=1)
|
||||||
|
|
||||||
actions = list()
|
actions = list()
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import pendulum
|
|||||||
|
|
||||||
from airflow import DAG
|
from airflow import DAG
|
||||||
|
|
||||||
|
|
||||||
with DAG(
|
with DAG(
|
||||||
"district_bank_dag",
|
"district_bank_dag",
|
||||||
schedule_interval="@monthly",
|
schedule_interval="@monthly",
|
||||||
@@ -16,7 +15,7 @@ with DAG(
|
|||||||
) as dag:
|
) as dag:
|
||||||
t1 = BashOperator(
|
t1 = BashOperator(
|
||||||
task_id='district_bank',
|
task_id='district_bank',
|
||||||
bash_command='business/district_bank.py',
|
bash_command='python /opt/airflow/dags/repo/dags/poi/business/district_bank.py',
|
||||||
)
|
)
|
||||||
t1
|
t1
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
pip install -r requirements.txt -i https://repo.fangjia.com/repository/pypi-public/simple/
|
||||||
@@ -1,2 +1 @@
|
|||||||
apache-airflow
|
|
||||||
goojia_utils
|
goojia_utils
|
||||||
Reference in New Issue
Block a user