Skip to content

KineticCafe/bamboo_oban_delivery_strategy

Repository files navigation

Bamboo.ObanDeliveryStrategy

A delivery strategy for Bamboo that uses Oban. We haven't used this in a while, so it might not work anymore.

Installation

  1. Add bamboo, oban, and bamboo_oban_delivery_strategy to your mix.exs:

    def deps do
      [
        {:bamboo, "~> 1.0"},
        {:oban, "~> 2.0"},
        {:bamboo_oban_delivery_strategy, "~> 1.0"}
        # OR: {:bamboo_oban_delivery_strategy, github: "KineticCafe/bamboo_oban_delivery_strategy"}
      ]
    end
  2. Follow the Bamboo Getting Started Guide.

  3. Follow the Oban Installation guide

  4. Add Bamboo.ObanDeliveryStrategy to your mailer configuration. Optionally configure the queue and maximum attempts.

    # In your config/config.exs file
    deliver_later_strategy =
      if Mix.env() == :test do
        Bamboo.ImmediateDeliveryStrategy
      else
        Bamboo.ObanDeliveryStrategy
      end
    
    config :my_app, MyApp.Mailer, deliver_later_strategy: deliver_later_strategy
    
    # Optional, but recommended. If not provided, defaults to "default" and 10
    # attempts.
    configure :bamboo, ObanDeliveryStrategy, queue: "mailers", max_attempts: 15

Community and Contributing

We welcome your contributions, as described in Contributing.md. Like all Kinetic Cafe open source projects, is under the Kinetic Cafe Open Source Code of Conduct.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages