Python process locker to avoid repeatedly executing the same script at the same time
Project description
py-heart-locker
python 进程锁定器,避免同一时间重复执行相同的脚本
运行环境
使用说明
- 安装:
python -m pip install py-heart-locker - 在代码中使用:
from lock import locker
def main() :
if locker.islocked() :
return
locker.lock()
core()
def core() :
# 业务核心代码
if __name__ == '__main__' :
main()
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
py_heart_locker-1.1.tar.gz
(9.0 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 py_heart_locker-1.1.tar.gz.
File metadata
- Download URL: py_heart_locker-1.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d600304ff1e50c4338d17f067d61eef5eb2dd76873dd5d9c6f42f26047be767a
|
|
| MD5 |
ab81fc4ace2bae1f7d7ef81a2b88f283
|
|
| BLAKE2b-256 |
60593a433ec5eccd7e6a8f6bb7914f08dcbc0f6212ef2cd7f38bb36b62edc224
|
File details
Details for the file py_heart_locker-1.1-py3-none-any.whl.
File metadata
- Download URL: py_heart_locker-1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98d6a3a5acd93e1d967a08164046dad708dbaa286a851a718bc9c8b592f11f33
|
|
| MD5 |
ab19743efb6eb64d8389225c4e64c480
|
|
| BLAKE2b-256 |
b50c21123297fb2066b4222a8f0131070cd843d05aa611dbabbe3f49ea1cfaa8
|