Skip to content

Commit

Permalink
Add logger info (#128)
Browse files Browse the repository at this point in the history
* Fixed weekday alignment issues

* Fixed override issue
  • Loading branch information
vinnie4k authored Jan 7, 2024
1 parent bbc86a7 commit fd95f2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 3 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
scheduler.init_app(app)
scheduler.start()

# Logging
logging.basicConfig(format="%(asctime)s %(levelname)-8s %(message)s", level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S")


@app.route("/")
def index():
Expand Down
9 changes: 3 additions & 6 deletions src/scrapers/sp_hours_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def fetch_sp_facility():

# Check if hours exist and is within next 7 days
if hours and within_week(date):
if hours == MARKER_CLOSED:
clean_hours(date, get_facility_id(name))
else:
# Clean hours from database
clean_hours(date, get_facility_id(name))
if hours != MARKER_CLOSED:
parse_special_hours(hours, type, date, get_facility_id(name))


Expand Down Expand Up @@ -101,9 +101,6 @@ def add_special_facility_hours(start_time, end_time, facility_id, court_type=Non
start_unix = unix_time(start_time)
end_unix = unix_time(end_time)

# Clean hours from database
clean_hours(start_time, facility_id)

# Create hours
hrs = OpenHours(
end_time=end_unix,
Expand Down

0 comments on commit fd95f2d

Please sign in to comment.