enqueue<TPayload> abstract method

Future<DVJobEnvelope<TPayload>> enqueue<TPayload>(
  1. String queue,
  2. TPayload payload, {
  3. int priority,
  4. int maxAttempts,
  5. Duration backoff,
  6. String? tenant,
})

Stores payload on queue.

tenant is the tenant the job was dispatched under, and an adapter stores it and hands it back on the envelope reserve returns. Dropping it is not a smaller feature: the worker would run the job as no tenant, which reads nothing on a scoped table and writes rows nobody can see.

Implementation

Future<DVJobEnvelope<TPayload>> enqueue<TPayload>(
  String queue,
  TPayload payload, {
  int priority,
  int maxAttempts,
  Duration backoff,
  String? tenant,
});