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.9.0.tar.gz
(17.1 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.9.0.tar.gz.
File metadata
- Download URL: plain_worker-0.9.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701fdb70af59299928c70b78a2cd02c61a190a1eeaba7a2cbf6cb51e5cc13298
|
|
| MD5 |
98bde36e48d3779fc380291ddd83661f
|
|
| BLAKE2b-256 |
55e46c7215eddff10b4adbb9210184017d9705c94b83b6c24a09c8e4d0a27c8e
|
File details
Details for the file plain_worker-0.9.0-py3-none-any.whl.
File metadata
- Download URL: plain_worker-0.9.0-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21a96d541059f2013e89ecc57952fb7b08e879a2b7744f44fcb44310265d2a03
|
|
| MD5 |
9e3d91947e7a0e1f7307fd6670b0264a
|
|
| BLAKE2b-256 |
95072698de22a74d675180db1ee915a53cec6aa1ec9970b19226d51e2ae068d2
|