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.13.0.tar.gz (17.7 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.13.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_worker-0.13.0.tar.gz
Algorithm Hash digest
SHA256 d30f1b00754993f4c2f7e48d4607fdc889a31a2b4c25d6d6ccb87d3bacd1feec
MD5 706d50594b2e6a45c6f893f0908bdbc3
BLAKE2b-256 deb62f4e8c0cb8793f8718055cf5f69bc9c2045b4714033ce7c1baa7b92d92f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_worker-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d78a536ac9f65f9c76875ebdc91be8c8c0531f61499f51e28a8a148a9b7f127
MD5 d1f486fd78ed56e52d45965312896192
BLAKE2b-256 9d53744f7bc482bf40cf44f3155469a552625e5f04f8a33bee6b15ffd5ff4c48

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