Skip to content

Commit

Permalink
Fix minor path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ty-kmu committed Feb 13, 2025
1 parent db0ceb2 commit 8d44b9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions collector/spot-dataset/aws/ec2/sps/collect_sps.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@
def main():
# ------ Setting Constants ------
CURRENT_LOCAL_BASE_PATH = "/home/ubuntu/spotlake/collector/spot-dataset/aws/ec2/sps"

current_time = datetime.now(timezone.utc)
BUCKET_NAME = None
if current_time >= datetime(2025, 2, 13, tzinfo=timezone.utc):
BUCKET_NAME = "spotlake"
if current_time.hour == 0 and current_time.minute <= 9:
os.remove(f"{CURRENT_LOCAL_BASE_PATH}/credential_index.txt")
os.remove(f"{CURRENT_LOCAL_BASE_PATH}/target_capacity_index.txt")
send_slack_message("신규 SPS Collector 주 저장 및 업로드 경로 전환")
else:
BUCKET_NAME = "sps-collector" # test

BUCKET_NAME = "spotlake"
WORKLOAD_BASE_PATH = "rawdata/aws/workloads"
SPS_BASE_PATH = "rawdata/aws/sps"
CREDENTIAL_FILE_PATH = "credential/credential_3699.csv"
Expand Down
2 changes: 1 addition & 1 deletion collector/spot-dataset/aws/ec2/sps/start_query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
current_date=$(date -u '+%Y-%m-%dT%H:%M')
echo "Cron Job Executed at $current_date" > /home/ubuntu/cron_test.log

python3 /home/ubuntu/spotlake/collector/spot-dataset/aws/collector/server/sps/collect_sps.py --timestamp "$current_date" > /home/ubuntu/cron_output.log 2>&1
python3 /home/ubuntu/spotlake/collector/spot-dataset/aws/ec2/sps/collect_sps.py --timestamp "$current_date" > /home/ubuntu/cron_output.log 2>&1

0 comments on commit 8d44b9b

Please sign in to comment.