honeydew v1.1.5 Honeydew.EctoPollQueue View Source

Link to this section Summary

Functions

Creates a supervision spec for an Ecto Poll Queue

Link to this section Types

Link to this type ecto_poll_queue_spec_opt() View Source
ecto_poll_queue_spec_opt() ::
  Honeydew.queue_spec_opt()
  | {:schema, module()}
  | {:repo, module()}
  | {:poll_interval, pos_integer()}
  | {:stale_timeout, pos_integer()}

Link to this section Functions

Creates a supervision spec for an Ecto Poll Queue.

In addition to the arguments from queue_spec/4:

You must provide:

  • repo: is your Ecto.Repo module
  • schema: is your Ecto.Schema module

You may provide:

  • poll_interval: is how often Honeydew will poll your database when the queue is silent, in seconds (default: 10)
  • stale_timeout: is the amount of time a job can take before it risks retry, in seconds (default: 300)

For example:

  • Honeydew.queue_spec(:classify_photos, repo: MyApp.Repo, schema: MyApp.Photo)

  • Honeydew.queue_spec(:classify_photos, repo: MyApp.Repo, schema: MyApp.Photo failure_mode: {Honeydew.Retry, times: 3})