Skip to content

Commit

Permalink
Add email_list_update_interval to entrypoint.sh
Browse files Browse the repository at this point in the history
Add check for existence of vcs_dictory
fixes #6
fixes #7
  • Loading branch information
PhongT16 committed Aug 16, 2023
1 parent c10c49f commit 28e0fcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion OutlookCalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import argparse
from datetime import datetime
from SimpleEvent import SimpleEvent
from os import path
from datetime import timedelta
import time
import logging
Expand Down Expand Up @@ -111,7 +112,9 @@ def main(configs):
configs = utils.get_configurations()

formater = logging.Formatter('%(name)s:%(asctime)s:%(filename)s:%(levelname)s:%(message)s')

if not path.exists(configs['vcs_directory']):
raise KeyError(f"{configs['vcs_directory']} does not exist.")

rotate_file_handler_info = handlers.RotatingFileHandler(f"{configs['vcs_directory']}vcs.log", mode='a', maxBytes=2000000, backupCount=2)
rotate_file_handler_info .setFormatter(fmt=formater)
rotate_file_handler_info .setLevel(logging.DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
CONFIG_FILE=/root/vacation_calendar_sync_config.yaml
REQUIRED_PARAMETERS="client_id tenant_id recipient_email scopes group_name shared_calendar_name category_name category_color vcs_directory AM_config PM config days_out update_interval"
REQUIRED_PARAMETERS="client_id tenant_id recipient_email scopes group_name shared_calendar_name category_name category_color vcs_directory AM_config PM config days_out update_interval email_list_update_interval"

if [[ -f "$CONFIG_FILE" ]]; then
for i in $REQUIRED_PARAMETERS; do
Expand Down

0 comments on commit 28e0fcb

Please sign in to comment.