Description

Such feature might be proved to be useful when you need to execute a task for a specific campaign manually.

By also providing an explicit declaration of a remote slave cluster, it is possible to perform a debugging task that might uncover the root cause of a problem (to find out whether it is a problem with the campaign itself or with the service).

Execution logic

Process starts from creating a task in the database (CampaignStrictRequest) via API. These records contain the following fields:

  • campaign_id - the ID of the campaign the task is related to
  • consumer_id - the ID of the consumer that should grab the task
  • either firebase or apns flag should be set to indicate the push service provider to be used
  • debug flag should be set to indicate that the task is a debugging one

A successful API response contains the ID (ObjectIe) of the created task which then can be used to track the task’s status.

After the task is created, it immidiately becomes available for the remote cluster’s consumer. Consumer grabs the task and executes it.

Task results should be available in a separate API response with the list of message request batches that were sent during the task :

[{batch_id: str, instance_id: int, size: int, firebase_uuid: Optional[str], apns_uuid: Optional[str], sender_id: Optional[int], messages_per_user: int}]