diff --git a/slack-bot/__pycache__/pullTrafficInfo.cpython-37.pyc b/slack-bot/__pycache__/pullTrafficInfo.cpython-37.pyc index e39ef70..5ebf974 100644 Binary files a/slack-bot/__pycache__/pullTrafficInfo.cpython-37.pyc and b/slack-bot/__pycache__/pullTrafficInfo.cpython-37.pyc differ diff --git a/slack-bot/sendToSQS.py b/slack-bot/sendToSQS.py index e5314eb..31da460 100644 --- a/slack-bot/sendToSQS.py +++ b/slack-bot/sendToSQS.py @@ -1,7 +1,20 @@ import boto3 +import os +import sys +sys.path.append(os.getcwd()) from pullTrafficInfo import getTrafficInfo +import base64 +import emoji session = boto3.Session(profile_name='plex-aws') sqs = session.resource('sqs') -queue = sqs.create_queue(QueueName='test', Attributes={'DelaySeconds': '5'}) +# queue = sqs.create_queue(QueueName='test', Attributes={'DelaySeconds': '5'}) + +inst = getTrafficInfo.getTrafficURL('A50').findIncidents() \ + .getIncidentInformation().generateOutput() + +inst.output + +encoded = base64.b64encode(inst.output[0].encode()) +decoded = base64.b64decode(encoded).decode()