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.0.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for py_heart_locker-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1843bb0f90f971ae1831ac0b92f65d476cecedb88ef36ecf6bdad35c8efdd473 |
|
MD5 | 0c2c43c836cd2c6984362e2b0349ba3f |
|
BLAKE2b-256 | 81cd902bd8393895e821c61acd362dab5a6f7ae9905f82007c50fd37a4575696 |