Description

A campaigns consumer is an authentication entity that is used for accessing campaign_request via scheduler API. Other than authentication, it also provides a way to identify a location from which messages are being sent.

Structure

class MessageCampaignConsumers(models.Model):
    consumer_id = models.UUIDField(null=False, blank=False, default=uuid.uuid4)
    description = models.TextField(null=True)
    token = models.CharField(max_length=64, db_index=True, null=False)
    tasks_taken = models.PositiveBigIntegerField(default=0, null=False, blank=True)
    ratio = models.FloatField(null=True, blank=True, default=1)
    group = models.CharField(max_length=50, null=True, choices=CampaignConsumerGroups.choices, blank=True, db_index=True)
    firebase_groups = models.ManyToManyField(FirebaseGroup, null=True, blank=True)
    apns_groups = models.ManyToManyField(APNSGroup, null=True, blank=True)
    is_active = models.NullBooleanField(db_index=True, default=True)