Remove unnecessary code

This commit is contained in:
Claudio Ortolina
2025-07-03 21:10:59 +01:00
parent 024ba38b63
commit b2bc5f07f7
2 changed files with 0 additions and 29 deletions
@@ -19,7 +19,6 @@ defmodule MusicLibrary.ScrobbleRules.Worker do
case ScrobbleRules.apply_all_rules() do
{:ok, results} ->
log_results(results)
:ok
{:error, reason} ->
Logger.error("Failed to apply scrobble rules: #{inspect(reason)}")
@@ -64,26 +63,4 @@ defmodule MusicLibrary.ScrobbleRules.Worker do
})
end)
end
@doc """
Schedules the worker to run periodically.
This should be called during application startup to ensure
the worker runs automatically.
"""
def schedule_periodic do
# Schedule to run every 30 minutes
__MODULE__.new(%{})
|> Oban.insert(schedule_in: {30, :minute})
end
@doc """
Triggers the worker to run immediately.
Useful for manual rule application or testing.
"""
def run_now do
__MODULE__.new(%{})
|> Oban.insert()
end
end