-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
21 lines (17 loc) · 721 Bytes
/
run.py
File metadata and controls
21 lines (17 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from decouple import config
import datetime
import logging
import watchtower
DEBUG = config('DEBUG', default=True, cast=bool)
S3_INPUT = config('S3_INPUT', default=None)
logger = logging.getLogger('tutorial-batch-data-engineering')
cloudwatch_handler = watchtower.CloudWatchLogHandler(
log_group='arthuralvim', stream_name='tutorial-batch-data-engineering')
cloudwatch_handler.setLevel(logging.INFO)
cloudwatch_handler.setFormatter(logging.Formatter('%(message)s'))
logger.addHandler(cloudwatch_handler)
if __name__ == '__main__':
start_time = datetime.datetime.utcnow()
print('EXECUTION BEGIN:', start_time)
print('RUNNING!')
print('EXECUTION DURATION:', datetime.datetime.utcnow() - start_time)