def test_identity_generation(self): self.assertRegexpMatches(log.identity('worker'), '^worker_[0-9]+$')
from optparse import OptionParser import boto.sqs import log import json from boto.sqs.message import Message import datetime from provider import process identity = log.identity("lax_simulator") logger = log.logger("lax_simulator.log", "INFO", identity) class ShortRetryException(RuntimeError): pass class LaxSimulator: def __init__(self, settings, logger): self._settings = settings self.logger = logger def listen(self, flag): self.logger.info("started") conn = boto.sqs.connect_to_region( self._settings.sqs_region, aws_access_key_id=self._settings.aws_access_key_id, aws_secret_access_key=self._settings.aws_secret_access_key, ) input_queue = conn.get_queue(self._settings.xml_info_queue) output_queue = conn.get_queue(self._settings.lax_response_queue) if input_queue is not None:
from optparse import OptionParser import boto.sqs from boto.sqs.message import Message from boto.s3.key import Key from boto.s3.connection import S3Connection import requests from requests.auth import HTTPBasicAuth from provider import process from provider import eif as eif_provider import log import json import newrelic.agent identity = log.identity('shimmy') logger = log.logger('shimmy.log', 'INFO', identity) class ShortRetryException(RuntimeError): pass class Shimmy: def __init__(self, settings, logger): self._settings = settings self.logger = logger def listen(self, flag): self.logger.info("started") conn = boto.sqs.connect_to_region( self._settings.sqs_region, aws_access_key_id=self._settings.aws_access_key_id,
from optparse import OptionParser import boto.sqs import log import json from boto.sqs.message import Message import datetime from provider import process identity = log.identity('lax_simulator') logger = log.logger('lax_simulator.log', 'INFO', identity) class ShortRetryException(RuntimeError): pass class LaxSimulator: def __init__(self, settings, logger): self._settings = settings self.logger = logger def listen(self, flag): self.logger.info("started") conn = boto.sqs.connect_to_region( self._settings.sqs_region, aws_access_key_id=self._settings.aws_access_key_id, aws_secret_access_key=self._settings.aws_secret_access_key) input_queue = conn.get_queue(self._settings.xml_info_queue) output_queue = conn.get_queue(self._settings.lax_response_queue) if input_queue is not None: while flag.green():
from optparse import OptionParser import boto.sqs import log import json from boto.sqs.message import Message from provider import process import base64 from dateutil.parser import parse import newrelic.agent identity = log.identity('lax_response_adapter') logger = log.logger('lax_response_adapter.log', 'INFO', identity) class ShortRetryException(RuntimeError): pass class LaxResponseAdapter: def __init__(self, settings, logger): self._settings = settings self.logger = logger def listen(self, flag): self.logger.info("started") conn = boto.sqs.connect_to_region(self._settings.sqs_region, aws_access_key_id=self._settings.aws_access_key_id, aws_secret_access_key=self._settings.aws_secret_access_key) input_queue = conn.get_queue(self._settings.lax_response_queue) output_queue = conn.get_queue(self._settings.workflow_starter_queue) if input_queue is not None: while flag.green():
from optparse import OptionParser import boto.sqs from boto.sqs.message import Message from boto.s3.key import Key from boto.s3.connection import S3Connection import requests from requests.auth import HTTPBasicAuth from provider import process from provider import eif as eif_provider import log import json import newrelic.agent identity = log.identity('shimmy') logger = log.logger('shimmy.log', 'INFO', identity) class ShortRetryException(RuntimeError): pass class Shimmy: def __init__(self, settings, logger): self._settings = settings self.logger = logger def listen(self, flag): self.logger.info("started") conn = boto.sqs.connect_to_region(self._settings.sqs_region, aws_access_key_id=self._settings.aws_access_key_id, aws_secret_access_key=self._settings.aws_secret_access_key) input_queue = conn.get_queue(self._settings.website_ingest_queue)