Added manticore sync all tool, updated manticore driver.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user