Exemplo n.º 1
0
def placements():
    """Processes placements.

  """
    placement_feed = Feed(project.task['auth'],
                          project.task['sheet_id'],
                          'placement_feed',
                          spreadsheet=spreadsheet,
                          timezone=project.task.get('timezone', None))

    pricing_schedule_feed = Feed(project.task['auth'],
                                 project.task['sheet_id'],
                                 'placement_pricing_schedule_feed',
                                 spreadsheet=spreadsheet,
                                 timezone=project.task.get('timezone', None))

    transcode_configs_feed = Feed(project.task['auth'],
                                  project.task['sheet_id'],
                                  'transcode_configs_feed',
                                  spreadsheet=spreadsheet,
                                  timezone=project.task.get('timezone', None))

    placement_dao.map_placement_transcode_configs(placement_feed.feed,
                                                  transcode_configs_feed.feed,
                                                  pricing_schedule_feed.feed)

    execute_feed(placement_feed, placement_dao, FieldMap.PLACEMENT_NAME,
                 'Processing placement')

    pricing_schedule_feed.update()
Exemplo n.º 2
0
def creatives():
  """Processes creatives.

  """
  creative_asset_feed = Feed(project.task['auth'], project.task['sheet_id'],
                        'creative_asset_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))

  creative_feed = Feed(project.task['auth'], project.task['sheet_id'],
                       'creative_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))

  third_party_url_feed = Feed(project.task['auth'], project.task['sheet_id'],
                              'third_party_url_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))


  creative_association_feed = Feed(project.task['auth'],
                                   project.task['sheet_id'],
                                   'creative_asset_association_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))

  creative_dao.map_creative_third_party_url_feeds(creative_feed.feed,
                                                  third_party_url_feed.feed)
  third_party_url_feed.update()

  creative_dao.map_creative_and_association_feeds(
      creative_feed.feed, creative_association_feed.feed)

  creative_dao.map_assets_feed(creative_asset_feed)

  execute_feed(creative_feed, creative_dao, FieldMap.CREATIVE_NAME,
               'Processing creative')

  execute_feed(creative_association_feed, creative_association_dao, FieldMap.CREATIVE_ID,
               'Associating with campaign, creative id')

  creative_association_feed.update()
Exemplo n.º 3
0
def ads():
  """Processes ads.

  """
  placement_feed = Feed(project.task['auth'], project.task['sheet_id'],
                        'placement_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))
  event_tag_profile_feed = Feed(project.task['auth'], project.task['sheet_id'],
                                'event_tag_profile_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))
  ad_feed = Feed(project.task['auth'], project.task['sheet_id'], 'ad_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))
  ad_creative_assignment_feed = Feed(project.task['auth'],
                                     project.task['sheet_id'],
                                     'ad_creative_assignment_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))

  ad_placement_assignment_feed = Feed(project.task['auth'],
                                      project.task['sheet_id'],
                                      'ad_placement_assignment_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))
  ad_event_tag_assignment_feed = Feed(project.task['auth'],
                                      project.task['sheet_id'],
                                      'event_tag_ad_assignment_feed', spreadsheet=spreadsheet, timezone=project.task.get('timezone', None))

  ad_dao.map_feeds(ad_feed.feed, ad_creative_assignment_feed.feed,
                   ad_placement_assignment_feed.feed,
                   ad_event_tag_assignment_feed.feed, placement_feed.feed,
                   event_tag_profile_feed.feed)
  execute_feed(ad_feed, ad_dao, FieldMap.AD_ID, 'Processing Ad')

  ad_creative_assignment_feed.update()
  ad_placement_assignment_feed.update()
  ad_event_tag_assignment_feed.update()
  event_tag_profile_feed.update()