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.1.tar.gz (17.1 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.8.1-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_worker-0.8.1.tar.gz
Algorithm Hash digest
SHA256 21fc3451d57a5155edba21620712a52b8fa0f9761aa72066d81e669a17e7f8ea
MD5 7f44daded8c15258d8c9779a7d4dceaf
BLAKE2b-256 b7e8be953578cdc39e1721025fe18b849ab97491cac82e099cec5b5fc64517cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_worker-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a7747dcd54e94335e521e97827d3515b76ddbfc833f0a92009d7f9c59e45f32
MD5 bd6ad4d0730e8dfb848cc1dad8ca7ba4
BLAKE2b-256 0b5366f94707a4641db44835e373ff010acefb3c6d808540b088ea5c3c4a1c69

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