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.1.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.13.1-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plain_worker-0.13.1.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.13.1.tar.gz
Algorithm Hash digest
SHA256 27fb10753f6990c644ba11d6f41da3ca7dcae7e522459c13f602704d357c6c71
MD5 54a6f88e4a3be20d8c1e6a35bf7c6c51
BLAKE2b-256 cc63206da2ed25ce9b6c6c360c329862920f9795c914c019cf95724a5b47dd24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_worker-0.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8b6933e257dd62c4f5442770f571e18f89c663827fa6c16efd87c3a02a0a180
MD5 a6608adb0a8b6e7835c9dceb4026d0c0
BLAKE2b-256 14cdd227ff2d5441819e58847d6578f3e332335af3e81a8bb2bc11faf21b2bc6

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