Oban.Worker.from_string

You're seeing just the function from_string, go back to Oban.Worker module for more information.
Link to this function

from_string(worker_name)

View Source (since 2.3.0)

Specs

from_string(String.t()) :: {:ok, module()} | {:error, Exception.t()}

Resolve a module from a worker string.

Examples

iex> Oban.Worker.from_string("Oban.Integration.Worker")
{:ok, Oban.Integration.Worker}

iex> defmodule NotAWorker, do: []
...> Oban.Worker.from_string("NotAWorker")
{:error, %RuntimeError{message: "module is not a worker: NotAWorker"}}

iex> Oban.Worker.from_string("RandomWorker")
{:error, %RuntimeError{message: "unknown worker: RandomWorker"}}