Created
August 25, 2019 09:58
-
-
Save nivleshc/29ad8f7c08646265c5c967a988bea746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(event, context): | |
print(datetime.datetime.now(), 'Started') | |
today = datetime.datetime.now(tz_sydney) | |
initialise_global_variables() | |
load_pushpinLabels_from_dynamodb(today) | |
#loop through each operator and get their vehicle positions | |
for operator in operators: | |
callOpenData(operator, feed) | |
process_feed(feed, today) | |
rdate = today.strftime("%Y-%m-%d") | |
time_now = datetime.datetime.now(tz_sydney) | |
mapImageName = time_now.strftime("%Y-%m-%dT%H%M") + '.jpg' | |
#get fhe image file and upload it to s3 | |
generate_vehicle_position_webpage(maps_bing_prefix + maps_bing_apikey,pushpin_url[:-1], bucketName, bucketImagesKey, mapImageName, HtmlLandingpagename, rdate) | |
update_pushpinLabelsTable(rdate) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment