#[derive(Task)]
{
// Attributes available to this derive:
#[task_name]
#[task_exchange]
#[task_routing_key]
#[task_timeout]
#[task_retries]
}
Expand description
Macros 1.1 implementation of #[derive(Task)]
This macro supports several attributes:
task_name
: a unique ID for the task. e.g:#[task_name = "batch-rs:send-confirmation-email"]
default value: The derived struct nametask_exchange
: the exchange this task will be published to. e.g:#[task_exchange = "batch.example"]
default value:""
task_routing_key
: the routing key associated to the task. e.g:#[task_routing_key = "mailer"]
task_timeout
: Number of seconds available for the task to execute. If the time limit is exceeded, the task’s process is killed and the task is marked as failed. e.g:#[task_timeout = "120"]
default value: 900 (15 minutes)task_retries
: Number of times the task should be retried in case of error. e.g:#[task_retries = "5"]
default value: 2