add old lci module
This commit is contained in:
1 parent
38a6e815f0
commit
8499631091
171 files changed
+25562
No files matched your search
@@ -0,0 +1,110 @@
|
||||
# PRJ
|
||||
.env/
|
||||
*.pem
|
||||
*.key
|
||||
./_init.csv
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
||||
# celery beat schedule file
|
||||
celerybeat-schedule
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
@@ -0,0 +1,5 @@
|
||||
# 自启动模块
|
||||
这是子系统的自启动模块,该程序是一次性进程,基于 _pmc 库模块。
|
||||
|
||||
# 做了什么
|
||||
启动脚本从 _init.csv 文件中读取模块列表,对每个目标调用 pmc start 子系统调用。
|
||||
@@ -0,0 +1,6 @@
|
||||
#extra/chat
|
||||
#users/smn
|
||||
#users/dnfs_ex
|
||||
#users/fortress
|
||||
users/sensors
|
||||
|
||||
|
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")" || exit
|
||||
bash ./_setup.sh
|
||||
source ./.env/bin/activate
|
||||
exec python init.py
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")" || exit
|
||||
python3 -m venv .env
|
||||
source ./.env/bin/activate
|
||||
source ./_src.sh
|
||||
#python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
@@ -0,0 +1,2 @@
|
||||
#pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
|
||||
子系统启动脚本
|
||||
这个脚本的功能是通过PMC调用完成子系统的初始化
|
||||
|
||||
'''
|
||||
from pmc import PmcComm
|
||||
import os
|
||||
import csv
|
||||
import time
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
with open(f"{script_dir}/_init.csv", encoding='utf-8') as f:
|
||||
reader = csv.reader(f)
|
||||
records = [row[0] for row in reader]
|
||||
def main():
|
||||
comm = PmcComm('http://localhost:8012')
|
||||
comm.Set_RSA_Pri_Key('../pmc/private_key.pem')
|
||||
comm.Try_Get_AES_Key()
|
||||
for item in records:
|
||||
if item and not item.startswith('#'):
|
||||
comm.try_start(item)
|
||||
time.sleep(1) # 保持一定的时间间隔,避免CPU占用
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,5 @@
|
||||
flask
|
||||
waitress
|
||||
GitPython>=3.1.0
|
||||
setuptools>=40.8.0
|
||||
../_pmc
|
||||
Reference in new issue
Block a user