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.15.0.tar.gz
(17.8 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.15.0.tar.gz.
File metadata
- Download URL: plain_worker-0.15.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
304c2ee92e7c396391c38bae9520925c9a512a2de81c782c789897f8182ab42d
|
|
| MD5 |
d10894dcc7e509922481ca66048365fb
|
|
| BLAKE2b-256 |
b13b9d1de078fa55160ddeedd8a7cc904f949e57296f0a6f6247886e6f0b8382
|
File details
Details for the file plain_worker-0.15.0-py3-none-any.whl.
File metadata
- Download URL: plain_worker-0.15.0-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
205c47b37bf236ba2f6029b61e788c02676874f2a43e57c070033376e4903c36
|
|
| MD5 |
8b9b7676257256195acf2c01fbaf31e2
|
|
| BLAKE2b-256 |
1837991763e2ca0a229b0d5b1ec2ef1d2e1dd65d18af042c9a4a7a95041ad122
|