** (ArgumentError) expected :engine to be a loaded module, got: Oban.Pro.Engines.SmartEngine

Hi, I am using oban pro, got this error on startup:

** (ArgumentError) expected :engine to be a loaded module, got: Oban.Pro.Engines.SmartEngine
            (oban 2.17.12) lib/oban/config.ex:91: Oban.Config.new/1
            (oban 2.17.12) lib/oban.ex:412: Oban.start_link/1
            (stdlib 6.0.1) supervisor.erl:959: :supervisor.do_start_child_i/3
            (stdlib 6.0.1) supervisor.erl:945: :supervisor.do_start_child/2
            (stdlib 6.0.1) supervisor.erl:929: anonymous fn/3 in :supervisor.start_children/2
            (stdlib 6.0.1) supervisor.erl:1803: :supervisor.children_map/4
            (stdlib 6.0.1) supervisor.erl:889: :supervisor.init_children/2
            (stdlib 6.0.1) gen_server.erl:2057: :gen_server.init_it/2
            (stdlib 6.0.1) gen_server.erl:2012: :gen_server.init_it/6
            (stdlib 6.0.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

“oban”: {:hex, :oban, "2.17.12}
“oban_pro”: {:hex, :oban_pro, "1.4.13}
“oban_web”: {:hex, :oban_web, “2.9.7”}

config :my_app, Oban,
  engine: Oban.Pro.Engines.SmartEngine,
  name: MyApp.Oban,
  repo: MyApp.Repo,
  queues: [
    bets: [local_limit: 1, global_limit: 1],
    wins: [local_limit: 1, global_limit: 1]
  ],
  plugins: [
    Oban.Plugins.Gossip,
    Oban.Web.Plugins.Stats,
    {
      Oban.Pro.Plugins.DynamicPruner,
      mode: {:max_age, {28, :days}}
    },
    {
      Oban.Pro.Plugins.DynamicCron,
      crontab: []
    }
  ]

Thank you!

engine: Oban.Pro.Engines.SmartEngine,

This should be engine: Oban.Pro.Engines.Smart, :smile:

https://getoban.pro/docs/pro/1.4.13/adoption.html#1-smart-engine

3 Likes