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.12.0.tar.gz
(17.2 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.12.0.tar.gz.
File metadata
- Download URL: plain_worker-0.12.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6995fddbadade1f9bf377ba788cc06b581d2a5532000b441cd737726663a13c3
|
|
| MD5 |
834e3fcc1485cc040a1b69f0692ae955
|
|
| BLAKE2b-256 |
71583d370564bdab1ec121aa288b5b37d8e1af71b71640bfb4608cc67bd77f3d
|
File details
Details for the file plain_worker-0.12.0-py3-none-any.whl.
File metadata
- Download URL: plain_worker-0.12.0-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68f7b5085a6950dfa750fc92ebc1e93befadaa41a28b57c4757521d0b3cbae44
|
|
| MD5 |
c346c9846dc69582ef454c1850ce7e9b
|
|
| BLAKE2b-256 |
00e0806bb1ec80c7053f36c06aef51cae9ce75d30a7c30fb9ea98d4395c609e8
|