https://github.com/exp-codes/py-heart-locker
python 进程锁定器,避免同一时间重复执行相同的脚本
https://github.com/exp-codes/py-heart-locker
lock locker programming pypi
Last synced: 9 months ago
JSON representation
python 进程锁定器,避免同一时间重复执行相同的脚本
- Host: GitHub
- URL: https://github.com/exp-codes/py-heart-locker
- Owner: EXP-Codes
- License: mit
- Created: 2023-09-28T15:07:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T23:30:28.000Z (about 2 years ago)
- Last Synced: 2025-03-10T10:44:53.777Z (10 months ago)
- Topics: lock, locker, programming, pypi
- Language: Python
- Homepage: https://pypi.org/project/py-heart-locker/
- Size: 62.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
# py-heart-locker
> python 进程锁定器,避免同一时间重复执行相同的脚本
------
## 运行环境

## 使用说明
1. 安装: `python -m pip install py-heart-locker`
2. 在代码中使用:
```python
from lock import locker
def main() :
if locker.islocked() :
return
locker.lock()
core()
def core() :
# 业务核心代码
if __name__ == '__main__' :
main()
```