Skip to content

Commit

Permalink
fix: make 'data' as a param
Browse files Browse the repository at this point in the history
  • Loading branch information
andyhuang18 committed Dec 5, 2024
1 parent cb71481 commit d5bca80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dashboard/company/scripts/workflow_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
dashboard_password = os.getenv('DASHBOARDS_DB_PASSWORD', '').strip()


def fetch_and_upload_contributorcount_by_month_to_clickhouse(csv_file_path):
def fetch_and_upload_contributorcount_by_month_to_clickhouse(csv_file_path, data):
# Step 1: 生成 CSV 文件并填充数据
with open(csv_file_path, 'w', newline='') as csvfile:
fieldnames = ['community', 'repository', 'month', 'count']
Expand Down Expand Up @@ -125,7 +125,7 @@ def fetch_and_upload_contributorcount_by_month_to_clickhouse(csv_file_path):
print("筛选后的 CSV 数据已成功上传到目标 ClickHouse 数据库")


def fetch_and_upload_api_data_to_clickhouse(csv_file_path):
def fetch_and_upload_api_data_to_clickhouse(csv_file_path, data):
# 获取最近6个月的日期
def get_last_six_months():
today = datetime.today()
Expand Down Expand Up @@ -247,7 +247,7 @@ def fetch_and_filter(url, months):


fetch_and_upload_contributorcount_by_month_to_clickhouse(
'../data/community_contributorbymonth.csv')
'../data/community_contributorbymonth.csv', data)

fetch_and_upload_api_data_to_clickhouse(
'../data/community_repository_data_cleaned.csv')
'../data/community_repository_data_cleaned.csv', data)

0 comments on commit d5bca80

Please sign in to comment.