Hi guys, I am trying to use Oban to queue jobs that send emails from a code that is run in task runner.
Sample code:
Ecto.Migrator.with_repo(MySystem.Repo, fn repo ->
Application.ensure_all_started(:oban)
Oban.start_link(repo: repo, engine: Oban.Pro.Engines.Smart, queues: [email: 10])
send_emails()
end)
I'm getting runtime error: (RuntimeError) could not lookup Ecto repo MySystem.Repo because it was not started or it does not exist
Any tips or help would be really appreciated. ๐๐ป
Thank you!