/pleroma_job_queue

This is repo is a mirror

Primary LanguageElixirGNU Affero General Public License v3.0AGPL-3.0

🗳 Pleroma Job Queue

A lightweight job queue

Installation

Add pleroma_job_queue to your list of dependencies in mix.exs:

def deps do
  [
    {:pleroma_job_queue, "~> 0.3.0"}
  ]
end

Configuration

List your queues with max concurrent jobs like this:

config :pleroma_job_queue, :queues,
  my_queue: 100,
  another_queue: 50

Configure the scheduler like this:

config :pleroma_job_queue, :scheduler,
  enabled: true,
  poll_interval: :timer.seconds(10),
  store: PleromaJobQueue.Scheduler.Store.ETS
  • enabled - whether the scheduler is enabled (Default: false)
  • poll_interval - how often to check for scheduled jobs in milliseconds (Default: 10_000)
  • store - a module that stores scheduled jobs. It should implement the PleromaJobQueue.Scheduler.Store behavior. The default is an in-memory store based on ETS tables: PleromaJobQueue.Scheduler.Store.ETS.

The scheduler allows you to execute jobs at specific time in the future. By default it uses an in-memory ETS table which means the jobs won't be available after restart.

Usage

See documentation

Copyright and License

Copyright © 2017-2019 Pleroma Authors

Pleroma Job Queue source code is licensed under the AGPLv3 License.