Skip to content

Commit

Permalink
auto push
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanchenxi95 committed Feb 13, 2018
1 parent 400353f commit 5e5ca61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion http_log_watcher/log_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import requests
import time
import logging
from datetime import datetime


REMOTE_HOST = 'http://ec2-54-193-126-147.us-west-1.compute.amazonaws.com:3000'

FEBRUARY_DATE_TIME = datetime(2018, 2, 1)

def get_logfile_list(ctl_name):
mac_log_dict = dict()
Expand Down Expand Up @@ -65,6 +66,11 @@ def run_processing_log_files_of_all_directories(db):
else:
raise ValueError("Invalid HTTP logfile, the file should start with 'http' or 'https'")

parsed_datetime = datetime.strptime(date_string, "%Y-%m-%d")

if FEBRUARY_DATE_TIME > parsed_datetime:
continue

# check whether to process the file
file_last_modified_time = get_file_last_modified_time(file_path)
last_time_line = get_last_time_processed_line(db, file_path)
Expand Down

0 comments on commit 5e5ca61

Please sign in to comment.