GameApp.Workers.LongJobWorker (game_app v0.1.0)

A worker module for handling long-running jobs using Oban.

This module defines a worker that processes jobs from the :long_jobs queue. Each job performs a simulated long-running task by sleeping for a random amount of time between 1,000 and 10,000 milliseconds.

Summary

Functions

Executes the job.

Returns the topic for broadcasting job updates.

Functions

Executes the job.

This function is called by Oban when a job is processed. It simulates a long-running task by sleeping for a random amount of time and then broadcasts the start and completion of the job.

Parameters

  • job: An Oban.Job struct containing the job arguments.

Returns

  • :ok
@spec topic() :: String.t()

Returns the topic for broadcasting job updates.

Returns

  • The topic as a string.