Run Script
Thư viện xử lý chạy các script của project mỗi khi deploy version mới, sau khi chạy xong thì lưu lại vết script đã chạy để lần sau không chạy lại nữa.
Cài đặt:
$ pip3 install m-run-script
Sử dụng:
Chạy các script của project:
from mobio.libs.run_script import MobioRunScript
VERSION_CONFIG = {
"every_deploy": {
"script": [
"PYTHONPATH=./ python3.8 -u sync_mongodb_index.py",
"PYTHONPATH=./ python3.8 -u sync_kafka_topic.py"
]
},
"version": {
1: ["PYTHONPATH=./ python3.8 -u scripts/script_1.py",
"PYTHONPATH=./ python3.8 -u scripts/script_2.py"],
2: ["PYTHONPATH=./ python3.8 -u scripts/script_3.py"]
}
}
MobioRunScript().run_script_by_version(VERSION_CONFIG)
Log - 1.0.0
- release sdk
Log - 1.0.1
- update
Log - 1.0.2
- chạy script theo thứ tự
Log - 1.0.3
- chạy script không bắt buộc
Metadata
Release files for m-run-script-test 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| m_run_script_test-1.0.5.tar.gz | 10.9 kB | Without provenance | Details |
Release files / m_run_script_test-1.0.5.tar.gz
| Download URL | m_run_script_test-1.0.5.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb2f364731940a4ab32f24b74b5d13c7a51bef935ec3360c3252da036abd5775
|
|
BLAKE2b-256 checksum How to use checksums |
b92e09bf80f2415e1ea6d3509783dc4e4bd78d982ea7bbce0af65204365480b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.7
|
Security for m-run-script-test 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.