@hupan56/wlkj 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/qoder/scripts/deployment/setup/init_doctor.py +15 -7
- package/templates/qoder/scripts/deployment/setup/setup.py +4 -1
- package/templates/qoder/scripts/domain/task/__pycache__/syncgate.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/__pycache__/__init__.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/__pycache__/bootstrap.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/core/__pycache__/__init__.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/core/__pycache__/paths.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/identity/__pycache__/__init__.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/identity/__pycache__/identity.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/io/__pycache__/__init__.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/io/__pycache__/atomicio.cpython-39.pyc +0 -0
- package/templates/qoder/scripts/foundation/io/__pycache__/filelock.cpython-39.pyc +0 -0
package/package.json
CHANGED
|
@@ -88,16 +88,24 @@ def problem(msg, hint=None):
|
|
|
88
88
|
|
|
89
89
|
def run_script(script, *args, timeout=1800):
|
|
90
90
|
"""跑另一个脚本, 实时透传输出。
|
|
91
|
-
|
|
91
|
+
|
|
92
|
+
v3.x: 脚本已分子目录 (domain/task/, domain/kg/build/, ...), 不再固定在少数子包。
|
|
93
|
+
用递归 glob 在 scripts/ 下找, 找不到才报错 —— 根治"目录一重组 run_script 就断链"
|
|
94
|
+
(旧版硬扫 io/setup/kg/build/test 这几个子目录, v3.0 重组后全找不到)。
|
|
95
|
+
"""
|
|
96
|
+
import glob
|
|
97
|
+
if not script.endswith('.py'):
|
|
98
|
+
script = script + '.py'
|
|
92
99
|
# 先试 scripts/根
|
|
93
100
|
cand = os.path.join(SCRIPTS_DIR, script)
|
|
94
101
|
if not os.path.isfile(cand):
|
|
95
|
-
#
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
# 递归找 scripts/**/<script>
|
|
103
|
+
hits = glob.glob(os.path.join(SCRIPTS_DIR, '**', script), recursive=True)
|
|
104
|
+
if hits:
|
|
105
|
+
cand = hits[0]
|
|
106
|
+
else:
|
|
107
|
+
print('[run_script] 找不到脚本: %s (在 scripts/ 下递归也没找到)' % script)
|
|
108
|
+
return False
|
|
101
109
|
cmd = [sys.executable, cand] + list(args)
|
|
102
110
|
r = subprocess.run(cmd, cwd=BASE, timeout=timeout)
|
|
103
111
|
return r.returncode == 0
|
|
@@ -658,7 +658,10 @@ def offer_cron(skip=False):
|
|
|
658
658
|
else:
|
|
659
659
|
warn(f'cron 注册失败: {(r.stderr or "").strip()[:100]}')
|
|
660
660
|
else:
|
|
661
|
-
|
|
661
|
+
if sys.platform == 'win32':
|
|
662
|
+
print(' 跳过。以后可手动跑 (双击或命令行): .qoder\\scripts\\setup_weekly_cron.bat')
|
|
663
|
+
else:
|
|
664
|
+
print(' 跳过。以后可手动跑: bash .qoder/scripts/setup_weekly_cron.sh')
|
|
662
665
|
|
|
663
666
|
|
|
664
667
|
# ============================================================
|
|
Binary file
|
|
Binary file
|
|
Binary file
|