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_test-1.0.3.tar.gz (8.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: m_run_script_test-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_test-1.0.3.tar.gz
Algorithm Hash digest
SHA256 cc7b71c60fcd4e6132c431d15b2894d2770863f202e367573aadccdfe913d0b9
MD5 a87a476e52ab96eb27a8133708da6c73
BLAKE2b-256 34f8e88fefaf8533cca49cc186d3ffa5250a1ec2ae4495f588ce1e4685d7895e

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