### 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:
```bash
$ pip3 install m-run-script
```
### Sử dụng:
##### Chạy các script của project:
```python
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
Raw data
{
"_id": null,
"home_page": "https://github.com/mobiovn",
"name": "m-run-script-test",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "mobio, mobio-script, version-script",
"author": "MOBIO",
"author_email": "contact@mobio.vn",
"download_url": "https://files.pythonhosted.org/packages/34/f8/e88fefaf8533cca49cc186d3ffa5250a1ec2ae4495f588ce1e4685d7895e/m_run_script_test-1.0.3.tar.gz",
"platform": null,
"description": "### Run Script\nTh\u01b0 vi\u1ec7n x\u1eed l\u00fd ch\u1ea1y c\u00e1c script c\u1ee7a project m\u1ed7i khi deploy version m\u1edbi, sau khi ch\u1ea1y xong th\u00ec l\u01b0u l\u1ea1i v\u1ebft script \u0111\u00e3 ch\u1ea1y \u0111\u1ec3 l\u1ea7n sau kh\u00f4ng ch\u1ea1y l\u1ea1i n\u1eefa. \n\n\n### C\u00e0i \u0111\u1eb7t:\n```bash\n $ pip3 install m-run-script\n ```\n\n### S\u1eed d\u1ee5ng:\n\n##### Ch\u1ea1y c\u00e1c script c\u1ee7a project:\n ```python\n from mobio.libs.run_script import MobioRunScript\n VERSION_CONFIG = {\n \"every_deploy\": {\n \"script\": [\n \"PYTHONPATH=./ python3.8 -u sync_mongodb_index.py\",\n \"PYTHONPATH=./ python3.8 -u sync_kafka_topic.py\"\n ]\n },\n \"version\": {\n 1: [\"PYTHONPATH=./ python3.8 -u scripts/script_1.py\",\n \"PYTHONPATH=./ python3.8 -u scripts/script_2.py\"],\n 2: [\"PYTHONPATH=./ python3.8 -u scripts/script_3.py\"]\n }\n }\n\n MobioRunScript().run_script_by_version(VERSION_CONFIG)\n\n ```\n#### Log - 1.0.0\n - release sdk\n\n#### Log - 1.0.1\n - update\n \n#### Log - 1.0.2\n - ch\u1ea1y script theo th\u1ee9 t\u1ef1\n\n#### Log - 1.0.3\n - ch\u1ea1y script kh\u00f4ng b\u1eaft bu\u1ed9c\n \n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Th\u01b0 vi\u1ec7n x\u1eed l\u00fd ch\u1ea1y c\u00e1c script c\u1ee7a project m\u1ed7i khi deploy version m\u1edbi",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/mobiovn",
"Source": "https://github.com/mobiovn"
},
"split_keywords": [
"mobio",
" mobio-script",
" version-script"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "34f8e88fefaf8533cca49cc186d3ffa5250a1ec2ae4495f588ce1e4685d7895e",
"md5": "a87a476e52ab96eb27a8133708da6c73",
"sha256": "cc7b71c60fcd4e6132c431d15b2894d2770863f202e367573aadccdfe913d0b9"
},
"downloads": -1,
"filename": "m_run_script_test-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "a87a476e52ab96eb27a8133708da6c73",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 8199,
"upload_time": "2024-11-11T07:41:24",
"upload_time_iso_8601": "2024-11-11T07:41:24.661767Z",
"url": "https://files.pythonhosted.org/packages/34/f8/e88fefaf8533cca49cc186d3ffa5250a1ec2ae4495f588ce1e4685d7895e/m_run_script_test-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 07:41:24",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "m-run-script-test"
}