🔍 Overview

The Voluum integration provides a thin abstraction over the Voluum API and a Redis-backed mapping used for bulk updates.

It is used to:


📦 Main components

1. VoluumAPIClient

Low-level API client for Voluum.

Supported resources:

  • landers
  • offers
  • campaigns

2. BaseVoluumManager

Abstract manager that:

  • loads a {resource -> [ids...]} map from Voluum
  • stores it in Redis under a model-specific key
  • updates all matching items by IDs

3. Managers

ManagerRedis keyPurpose
LandersVoluumManagervoluum_landers_mapUpdates landers by url.
OffersVoluumManagervoluum_offers_mapUpdates offers by url.
CampaignsVoluumManagervoluum_campaigns_mapUpdates campaigns by tracking domain (preferredTrackingDomain).

4. VoluumController

Orchestrates loading and updates.

🧩 Methods

MethodDescription
load_data(landers=True, offers=True, campaigns=True)Loads selected maps into Redis.
update_link(old_link, new_link, landers=True, offers=True)Updates landers/offers URLs for a link switch.
update_tracking_domain(old_domain, new_domain)Updates campaigns to use the new tracking domain.

🔄 How switching uses Voluum

  • When a link is blocked and a backup exists, MirrorRule calls VoluumController.update_link(old_link, new_link).
  • When a tracking domain pipeline switches domains (with with_update_voluum=True), it calls VoluumController.update_tracking_domain(old_domain, new_domain).