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
Release history Release notifications | RSS feed
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.18.0.tar.gz
(18.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plain_worker-0.18.0.tar.gz.
File metadata
- Download URL: plain_worker-0.18.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71ad08fb008bb4b32f384fcfdd08b879bea447067d2190973ef307a88e9e03a7
|
|
| MD5 |
d6d1c7f7a03253721e3b809a406def19
|
|
| BLAKE2b-256 |
5ba303af00b68725af938464543d7b81b441b09f093524fde3335c064410e4cb
|
File details
Details for the file plain_worker-0.18.0-py3-none-any.whl.
File metadata
- Download URL: plain_worker-0.18.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af0038ba3a996d0d680c1f7a53cdb86859b202efb6e78e3cc2a5d9786357d872
|
|
| MD5 |
91c43872f8fb408618272c6e28529a84
|
|
| BLAKE2b-256 |
75c9938a89ca76ec6b2851ea3eb98df9b94b738c283b782dda1234694c4d96bf
|