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.8.0.tar.gz (1.8 MB 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.8.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plain_worker-0.8.0.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for plain_worker-0.8.0.tar.gz
Algorithm Hash digest
SHA256 840059f6e80d1f4b7482df566e49ce03945e3135bceeafca04a6b8856d8ffd4e
MD5 50ee2fa3f062c248f40382a14d6e9792
BLAKE2b-256 c7ae7d62d21a25123adf49ebffe61f6f89b89c391ac91a2a1e26b438d94d86a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_worker-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 709db48b30ccd4df54dad9944e5ca70a74bed797991fd7cbd9fe2ba2bbd9636b
MD5 78b45ff9f54383de4ee6846b1bc6305d
BLAKE2b-256 f5c7bd978e9729c8784289693944dba8f44e56f03b13908475df10a65bacc4bf

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