updating sendToSQS.py
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user