Context Manager to set/reset the current process name.
Project description
proctitle Dynamic Process Names
Simple context manager so that tasks can be reflected in the process names of Celery workers.
For instance:
from proctitle import *
with ProcTitle("intense task"):
do_something_intense()
Can also be used as a function decorator:
from proctitle import *
import time
@ProcTitle("delay")
def g(n):
time.sleep(n)
g(10) # during this time, the proc title is "python - delay"
@ProcTitle("sleeping", replace=True)
def f(n):
time.sleep(n)
f(10) # during this time, the proc title is just "sleeping"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ProcTitle-0.1.6.tar.gz
(2.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 ProcTitle-0.1.6.tar.gz.
File metadata
- Download URL: ProcTitle-0.1.6.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
879001f5e7977a2704a16a7edddf946028e40f23893625eeba7339cf4b942aae
|
|
| MD5 |
a44c15769787bc6ebc555beac3b4d835
|
|
| BLAKE2b-256 |
5f9977b0bb7a49438617505ce564d01e00aed046cb561d55c13ff1ecf4b5ef37
|
File details
Details for the file ProcTitle-0.1.6-py3-none-any.whl.
File metadata
- Download URL: ProcTitle-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81ee37555744588809ffb408d07720b14fe466ed50bd8b83c8e170a00d1ccc3b
|
|
| MD5 |
9e47d7bc7d72979c5e8727b4eaee45b5
|
|
| BLAKE2b-256 |
5cf427bab9a7d1dadd64866071e7651ab9fbee008e1bffe9262b6efa30e37ada
|