Skip to main content

paper-rq

An administrative interface for managing RQ tasks in Paper Admin.

⚠ Default rq.scheduler is not supported! Use rq-scheduler instead.

PyPI Build Status Software license

Compatibility

Installation

Install the latest release with pip:

pip install paper-rq

Add paper_rq to your INSTALLED_APPS in django's settings.py:

INSTALLED_APPS = (
    # ...
    "paper_rq",
)

Add paper_rq to your PAPER_MENU:

from paper_admin.menu import Item

PAPER_MENU = [
    # ...
    Item(
        app="paper_rq",
        icon="bi-clock-history",
    ),
    # ...
]

Optionally, set paper_rq.jobs.Job as your job class:

RQ = {
    "JOB_CLASS": "paper_rq.jobs.Job",
    # ...
}

Result

4d17958f25.png

job decorator

The same as RQ's job decorator, but it automatically works out the connection argument from RQ_QUEUES. It also respects the RQ.DEFAULT_RESULT_TTL and RQ.DEFAULT_FAILURE_TTL settings.

Example:

import time

from paper_rq.decorators import job


@job("paper:default")
def sleep(delay):
    time.sleep(delay)
sleep.delay(5)

RQ Scheduler

First, ensure that you have the rq-scheduler library installed:

pip install rq-scheduler

If you need to run multiple isolated schedulers on the same server, you should use the class paper_rq.scheduler.Scheduler. This class reads the Redis keys from the RQ settings:

# settings.py

RQ = {
    "JOB_CLASS": "paper_rq.jobs.Job",
    "DEFAULT_RESULT_TTL": "7d",
    "DEFAULT_FAILURE_TTL": "30d",
    "SCHEDULER_CLASS": "paper_rq.scheduler.Scheduler",
    "SCHEDULER_LOCK_KEY": "rq:scheduler-1:scheduler_lock",
    "SCHEDULER_JOBS_KEY": "rq:scheduler-1:scheduled_jobs",
}

Release files for paper-rq 0.8.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paper-rq 0.8.5
File Size Uploaded
paper_rq-0.8.5.tar.gz 22.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paper-rq 0.8.5
File Interpreter ABI Platform
paper_rq-0.8.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 47.8 kB

Release files / paper_rq-0.8.5.tar.gz

Download URL paper_rq-0.8.5.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d9e39bd6e6995ecb2e4834e75c9234887724f688ab482780d37c776cbbed105a
BLAKE2b-256 checksum
How to use checksums
0603480c1a04595943a60f5aa3c9be2e227c784aa37726f1be9f9c4f641ba33f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release files / paper_rq-0.8.5-py2.py3-none-any.whl

Download URL paper_rq-0.8.5-py2.py3-none-any.whl
Size 24.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7dcfc0a5f1d138d1d9e2920e3589dabc28b2cfd6c069edf359fb98183ff0b30d
BLAKE2b-256 checksum
How to use checksums
814c2d49a8ce463bfc834892f4bfdc13ff40dbed199c00ea80a438bbb14a484b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.8.5 This release

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

1 release file

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page