Skip to main content

Thư viện xử lý chạy các script của project mỗi khi deploy version mới

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m_run_script-1.0.3.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file m_run_script-1.0.3.tar.gz.

File metadata

  • Download URL: m_run_script-1.0.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for m_run_script-1.0.3.tar.gz
Algorithm Hash digest
SHA256 88e489e9fdf45d8ea84277f5854802df7a52f223b5d8847a0d04d712ea179db5
MD5 45ff3a6dcec97e8464b40919d6707b23
BLAKE2b-256 c64002b05f76cc5dc2b0b319dbcc9eec43f37d35358f3e99d4a6e8607e701114

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page