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.
Staff
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.5.3.tar.gz
(24.3 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.5.3.tar.gz.
File metadata
- Download URL: plain_worker-0.5.3.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52233d6346af620cf47ad70a3cbe3f22cfedb59bd7665485daf530e657541351
|
|
| MD5 |
b2fc1a798ada5318fb215b80b9585137
|
|
| BLAKE2b-256 |
9c18c5f9b55cdbb1ef9f8ab3fcf332435bed7c1cb02e16864d9d5f8f85ed9cb5
|
File details
Details for the file plain_worker-0.5.3-py3-none-any.whl.
File metadata
- Download URL: plain_worker-0.5.3-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e72ce880a48e234e65a5ca659f000ac851568c53d572db340bd25776fdaa83f
|
|
| MD5 |
da6954a71295d2d110c94f70b4dd3826
|
|
| BLAKE2b-256 |
6956a4fb515a4309878146ac80ead36d9ce91eacedb8fd1e9fd0a9afec4c8e37
|