Added manticore sync all tool, updated manticore driver.

This commit is contained in:
2026-11-12 02:18:13 +01:00
parent de05075def
commit f5e3a8a2ae
7 changed files with 175 additions and 151 deletions
+5 -7
View File
@@ -1,9 +1,8 @@
import { knexOwner as knex } from '../src/knex.js';
import { utilsApi } from '../src/manticore.js';
import redis from '../src/redis.js';
import { syncStashes } from '../src/sync.js';
import runTool from './run-tool.js';
async function init() {
export async function rebuildStashes() {
await utilsApi.sql('drop table if exists scenes_stashed');
await utilsApi.sql(`create table if not exists scenes_stashed (
@@ -36,9 +35,8 @@ async function init() {
await syncStashes('scene');
await syncStashes('actor');
await syncStashes('movie');
await knex.destroy();
await redis.quit(); // sync imports connect to redis, which keeps the process alive
}
init();
if (import.meta.main) {
runTool(rebuildStashes);
}