Skip to main content

Background job processing for Plain.

Project description

Worker

Process background jobs with a database-driven worker.

from plain.worker import Job
from plain.mail import send_mail

# Create a new job class
class WelcomeUserJob(Job):
    def __init__(self, user):
        self.user = user

    def run(self):
        send_mail(
            subject="Welcome!",
            message=f"Hello from Plain, {self.user}",
            from_email="welcome@plainframework.com",
            recipient_list=[self.user.email],
        )


# Instantiate a job and send it to the worker
user = User.objects.get(pk=1)
WelcomeUserJob(user).run_in_worker()

The worker process is run separately using plain worker run.

Staff

Job history

Scheduled jobs

Monitoring

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plain_worker-0.6.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plain_worker-0.6.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file plain_worker-0.6.0.tar.gz.

File metadata

  • Download URL: plain_worker-0.6.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.18

File hashes

Hashes for plain_worker-0.6.0.tar.gz
Algorithm Hash digest
SHA256 fd18bf340b9aeffc3e5729ee7292cd4e936622360a6e1fc21eb90191f3e5a7b1
MD5 1698f45691caf8fc61e20dd77465b527
BLAKE2b-256 5f9e36d43231c2a6a1c87ad3e6a81179ccf8b3dd70c7d65bea9c88d12b068497

See more details on using hashes here.

File details

Details for the file plain_worker-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plain_worker-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54689122f3d7d799b99b078754f15b39f70ad01a10efdcb0763bf9892689a264
MD5 da2c4c6b9a9dd54fe89976aaef33aa40
BLAKE2b-256 b2037646a86c4d3b1586109ee3727a31293bb85a919d528cf15f65688ffe003c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page