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.

Admin

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.19.0.tar.gz (18.6 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.19.0-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_worker-0.19.0.tar.gz
Algorithm Hash digest
SHA256 cf4179133044b549b57d3962d60a66bba7b3c322027d5ca1c219ad6f7157f2b4
MD5 eee10c1501960616eaeb6c07159ab51e
BLAKE2b-256 4d6c8a0cf2afc88ba5eabbfef21653bafb991f286525a1867b4da3af7e3af6da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_worker-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 113fc1d18c96b5d303b1192efd34ef471ad3a1f7b319e2963c82211b6635aef4
MD5 905d330ad9935e8edf0f46b8bea31118
BLAKE2b-256 0c7a0ac6cafabf9a99e809a396e17b6561081f55d83212972a8d3e9b85d2e6e9

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