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.14.0.tar.gz (17.8 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.14.0-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_worker-0.14.0.tar.gz
Algorithm Hash digest
SHA256 91fa66e91b9759050ab64692afefd5116c1174e7ca7c029e98fb8441f89391fa
MD5 d707e7828527422c1dce4d31808dcee2
BLAKE2b-256 6bae2521f7d272e4bf4651a24333b5d5101935ee44c8c686c83e6baabc7e4483

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_worker-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a79c5ef41635ab08dd342f644ea475a883977300d4bd536dabcdf42a4c0f9b0
MD5 41bba461c6d3037f176a0d946046466e
BLAKE2b-256 d637e170b0f639b4a08906cba8a85edee6be7f997ac1e524d1119eb8f98d7f97

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