Skip to main content

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 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for m-run-script 1.0.4
File Size Uploaded Provenance
m_run_script-1.0.4.tar.gz 10.9 kB Without provenance Details

Release files / m_run_script-1.0.4.tar.gz

Download URL m_run_script-1.0.4.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e121c17ca91b9921c69858bac7bf8648bef497f623a211b70c9dce779a6d1fcb
BLAKE2b-256 checksum
How to use checksums
7955a48af1964ae2d6a5b1bd350de64c6bd8af3f0fc7a878a9dd9266600b627d
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 1.0.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page