feat(cookie-gate): 调度器恢复重跑接线与控制台健康自检
调度器维护循环挂载 CookieGateRecoveryManager,登录态恢复后按原业务日期自动 重跑被阻断工作流并飞书确认;工作流级 required_accounts 声明接入目录解析; 采集器抛 CookieExpiredError 退出 75;控制台新增 /api/health 自检端点与进程内 看门狗,配合 deploy/watchdog 双层保活;安装脚本同步。
This commit is contained in:
1 parent
78ea4641ce
commit
130f06b320
13 files changed
+318
-77
No files matched your search
@@ -4,6 +4,8 @@
|
||||
param(
|
||||
[string]$ProjectRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path,
|
||||
[string]$DataRoot = "",
|
||||
[string]$RuntimeEnvFile = "D:\product-collector-analyze-flow\.env",
|
||||
[string]$JushuitanEnvFile = "D:\product-collector-analyze-flow\private-secrets\jushuitan.env",
|
||||
[string]$ServiceName = "gyxx-flow-scheduler",
|
||||
[string]$NssmPath = "nssm.exe"
|
||||
)
|
||||
@@ -12,6 +14,13 @@ $ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version Latest
|
||||
|
||||
$project = (Resolve-Path -LiteralPath $ProjectRoot).Path
|
||||
$runtimeEnvPath = (Resolve-Path -LiteralPath $RuntimeEnvFile -ErrorAction Stop).Path
|
||||
$runtimeEnvPaths = @($runtimeEnvPath)
|
||||
if (Test-Path -LiteralPath $JushuitanEnvFile -PathType Leaf) {
|
||||
$runtimeEnvPaths += (Resolve-Path -LiteralPath $JushuitanEnvFile -ErrorAction Stop).Path
|
||||
} else {
|
||||
Write-Warning "Jushuitan environment file not found; Jushuitan workflows will fail safely until it is provisioned."
|
||||
}
|
||||
if ([string]::IsNullOrWhiteSpace($DataRoot)) {
|
||||
$DataRoot = Join-Path $project "var"
|
||||
}
|
||||
@@ -33,7 +42,9 @@ function Invoke-Nssm([string[]]$Arguments) {
|
||||
|
||||
Invoke-Nssm -Arguments @("install", $ServiceName, $python)
|
||||
Invoke-Nssm -Arguments @("set", $ServiceName, "AppDirectory", $project)
|
||||
Invoke-Nssm -Arguments @("set", $ServiceName, "AppParameters", "-m gyxx_flow schedule run")
|
||||
$envFileArguments = $runtimeEnvPaths | ForEach-Object { '--env-file "' + $_ + '"' }
|
||||
$schedulerArguments = '-m gyxx_flow schedule run ' + ($envFileArguments -join ' ')
|
||||
Invoke-Nssm -Arguments @("set", $ServiceName, "AppParameters", $schedulerArguments)
|
||||
Invoke-Nssm -Arguments @(
|
||||
"set", $ServiceName, "AppEnvironmentExtra",
|
||||
"GYXX_PROJECT_ROOT=$project", "GYXX_DATA_ROOT=$data", "PYTHONUTF8=1"
|
||||
|
||||
Reference in new issue
Block a user