"""PROPER Config Settings for Changed Releases Feed.""" import os from feed_sender.flows.proper_changed_releases.util import transforms FEED_NAME = 'proper_changed_releases' ENV = os.getenv('Environment') CHANGED_RELEASES_S3_PATH = ( 's3://{env}-feed-sender/proper/outgoing/{{date}}/changed/').format( env=ENV) CHANGED_RELEASES_FILENAME = 'essential_changes_{date}.csv' CHANGED_RELEASE_IDS_FILENAME = 'changed_release_ids_{date}.txt' CHANGED_JOB_IDS_FILENAME = 'changed_job_ids_{date}.txt' ART_RELATIONS_DB = 'art_relations' PHYSICAL_DELIVERY_DB = 'physical_delivery' DIRECT_DELIVERY_DB = 'direct_delivery' STORE_ID = '696' SFTP_HOST = os.getenv('PROPER_SFTP_HOST') SFTP_USER = os.getenv('PROPER_SFTP_USER') SFTP_PASSWORD = os.getenv('PROPER_SFTP_PASSWORD') SFTP_PORT = int(os.getenv('PROPER_SFTP_PORT', 22)) SFTP_CREDS = dict( host=SFTP_HOST, username=SFTP_USER, password=SFTP_PASSWORD, port=SFTP_PORT ) # Production -- Proper path SFTP_REMOTE_PATH = '/Orchard/' if ENV == 'dev': SFTP_REMOTE_PATH = '/Proper/outgoing/' # This is an ordered list of the fields that will be written to CSV. CHANGED_RELEASES_MAP = [ {'proper': 'CatalogueNumber', 'orchard': 'product_code'}, {'proper': 'Format', 'orchard': None}, {'proper': 'Artist', 'orchard': None}, {'proper': 'Title', 'orchard': None}, {'proper': 'Barcode', 'orchard': None}, {'proper': 'DateReleased', 'orchard': 'new_sale_start_date'}, {'proper': 'Price1', 'orchard': 'new_price'}, {'proper': 'Price2', 'orchard': None}, {'proper': 'Price3', 'orchard': None}, {'proper': 'Price4', 'orchard': None}, {'proper': 'Price5', 'orchard': None}, {'proper': 'LocalPrice', 'orchard': None}, {'proper': 'LabelCode', 'orchard': None}, {'proper': 'Weight', 'orchard': None}, {'proper': 'Charfield1', 'orchard': None}, {'proper': 'Charfield2', 'orchard': None}, {'proper': 'Charfield3', 'orchard': None}, {'proper': 'Supplier', 'orchard': None}, {'proper': 'Charfield4', 'orchard': None}, {'proper': 'DeletionType', 'orchard': 'new_deletion_status', 'transform': transforms.transform_deletion_status}, {'proper': 'decimalField1', 'orchard': None}, {'proper': 'PrimaryGenre', 'orchard': None}, {'proper': 'SecondaryGenre', 'orchard': None}, {'proper': 'Embargo', 'orchard': None}, {'proper': 'ArtworkPath', 'orchard': 'artworkpath'} ] # VECTOR job info ENCODER_ID = 23 VECTOR_JOB_QUEUE_NAME = ( '{env}-encoding23_e{{e_priority:0>7}}_d{{d_priority:0>7}}').format( env=ENV)