auto-save 2026-05-26 00:19 (~5)

This commit is contained in:
2026-05-26 00:19:06 +08:00
parent 544087cf9d
commit 4104bbe5d5
5 changed files with 22 additions and 17 deletions

View File

@@ -1,17 +1,5 @@
{
"entries": [
{
"files_changed": 1,
"message": "Codex 会话活跃 · 最近命令codex · 分支 main · 1 项未提交变更 · 最近提交docs: record subject pack deployment",
"ts": "2026-05-20T03:03:56Z",
"type": "session-heartbeat"
},
{
"files_changed": 1,
"message": "Codex 会话活跃 · 最近命令codex · 分支 main · 1 项未提交变更 · 最近提交docs: record subject pack deployment",
"ts": "2026-05-20T03:13:56Z",
"type": "session-heartbeat"
},
{
"files_changed": 1,
"message": "Codex 会话活跃 · 最近命令codex · 分支 main · 1 项未提交变更 · 最近提交docs: record subject pack deployment",
@@ -3226,6 +3214,19 @@
"message": "auto-save 2026-05-26 00:07 (+1, ~3)",
"hash": "089a30d",
"files_changed": 4
},
{
"ts": "2026-05-26T00:13:17+08:00",
"type": "commit",
"message": "auto-save 2026-05-26 00:13 (~8)",
"hash": "544087c",
"files_changed": 8
},
{
"ts": "2026-05-25T16:14:43Z",
"type": "session-heartbeat",
"message": "Codex 会话活跃 · 最近命令codex · 分支 main · 5 项未提交变更 · 最近提交auto-save 2026-05-26 00:13 (~8)",
"files_changed": 5
}
]
}

View File

@@ -29,7 +29,12 @@ ssh "$HOST" "set -euo pipefail
cat /tmp/skg-backup-warnings.log >&2 || true
exit 1
}
if docker ps --format '{{.Names}}' | grep -qx skg-marketing-postgres; then
docker exec skg-marketing-postgres sh -lc 'pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB"' \
| gzip > '$BACKUP_DIR/skg-marketing-postgres-'\$stamp'.sql.gz'
fi
find '$BACKUP_DIR' -name 'skg-marketing-preserve-*.tgz' -type f -printf '%T@ %p\n' | sort -nr | tail -n +8 | cut -d' ' -f2- | xargs -r rm -f
find '$BACKUP_DIR' -name 'skg-marketing-postgres-*.sql.gz' -type f -printf '%T@ %p\n' | sort -nr | tail -n +8 | cut -d' ' -f2- | xargs -r rm -f
echo backup:\$(ls -t '$BACKUP_DIR'/skg-marketing-preserve-*.tgz | head -1)
"

View File

@@ -25,5 +25,5 @@ ssh "$HOST" "cd '$APP_DIR' && \
set -e
test ! -f /app/.env || { echo \"ERROR: /app/.env leaked into API image\" >&2; exit 1; }
python -c \"import main; assert main.YTDLP_COOKIES_FROM_BROWSER == \\\"\\\", main.YTDLP_COOKIES_FROM_BROWSER; print(\\\"api:ytdlp_cookie_args\\\", main.ytdlp_cookie_args())\"
curl -sS http://127.0.0.1:4291/health | python -c \"import json,sys; d=json.load(sys.stdin); assert d[\\\"ok\\\"] is True; assert d[\\\"auth_configured\\\"] is True; print(\\\"api:health ok\\\")\"
curl -sS http://127.0.0.1:4291/health | python -c \"import json,sys; d=json.load(sys.stdin); assert d[\\\"ok\\\"] is True; assert d[\\\"auth_configured\\\"] is True; assert d.get(\\\"database\\\",{}).get(\\\"connected\\\") is True; print(\\\"api:health ok db connected\\\")\"
'"

View File

@@ -170,8 +170,7 @@ export const loadRemoteProjects = async () => {
const response = await requestJson('/canvas-projects')
remoteAvailable = true
const remoteItems = (response.items || []).map(projectFromApi)
const missingLocal = localItems.filter(local => !remoteItems.some(remote => remote.id === local.id))
const importedItems = await importLocalProjectsToServer(missingLocal)
const importedItems = await importLocalProjectsToServer(localItems)
const merged = mergeProjectLists(localItems, [...remoteItems, ...importedItems])
projects.value = merged
saveProjects({ remote: false })

View File

@@ -833,12 +833,12 @@ watch(
)
// Initialize | 初始化
onMounted(() => {
onMounted(async () => {
checkMobile()
window.addEventListener('resize', checkMobile)
// Initialize projects store | 初始化项目存储
initProjectsStore()
await initProjectsStore()
// Load project data | 加载项目数据
loadProjectById(route.params.id)