PSA/cli/portal-domain.nu
Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

50 lines
1.2 KiB
Plaintext

#!/usr/bin/env nu
use "utils.nu" [find-project-root parse-flag check-flag]
export def portal-domain-sessions-prune [
...args: string
] {
let tenant = (parse-flag $args "--tenant")
let minutes_value = (parse-flag $args "--minutes")
let older_than = if $minutes_value == null {
(parse-flag $args "--older-than-minutes")
} else {
$minutes_value
}
let dry_run = (check-flag $args "--dry-run")
let minutes = if $older_than == null {
"10"
} else {
$older_than
}
let project_root = (find-project-root)
mut args_list = [
"tsx"
"scripts/portal-domain-sessions-prune.ts"
"--older-than-minutes"
$minutes
]
if $tenant != null {
$args_list = $args_list ++ ["--tenant" $tenant]
}
if $dry_run {
$args_list = $args_list ++ ["--dry-run"]
}
let result = (
cd $"($project_root)/server";
^npx ...$args_list | complete
)
if $result.exit_code != 0 {
error make { msg: $"($env.ALGA_COLOR_RED)Failed to prune portal domain OTT sessions: ($result.stderr)($env.ALGA_COLOR_RESET)" }
}
print $result.stdout
}