Retired visitor database connection. Fixed empty traxxx breaking on missing batch IDs.
This commit is contained in:
@@ -104,9 +104,6 @@ module.exports = {
|
||||
assetPath: '/img',
|
||||
mediaPath: '/media',
|
||||
s3Path: 'https://s3.wasabisys.com',
|
||||
videoRestrictions: [ // entity slugs
|
||||
'_kink',
|
||||
'_kinkmen',
|
||||
],
|
||||
videoRestrictions: [], // entity slugs, _ prefix for networks, hides trailer and teaser videos
|
||||
},
|
||||
};
|
||||
|
||||
11
src/knex.js
11
src/knex.js
@@ -1,15 +1,6 @@
|
||||
import config from 'config';
|
||||
import knex from 'knex';
|
||||
|
||||
export const knexQuery = knex({
|
||||
client: 'pg',
|
||||
connection: config.database.query,
|
||||
pool: config.database.pool,
|
||||
// performance overhead, don't use asyncStackTraces in production
|
||||
asyncStackTraces: process.env.NODE_ENV === 'development',
|
||||
// debug: process.env.NODE_ENV === 'development',
|
||||
});
|
||||
|
||||
export const knexOwner = knex({
|
||||
client: 'pg',
|
||||
connection: config.database.owner,
|
||||
@@ -19,6 +10,8 @@ export const knexOwner = knex({
|
||||
// debug: process.env.NODE_ENV === 'development',
|
||||
});
|
||||
|
||||
export const knexQuery = knexOwner; // legacy
|
||||
|
||||
export const knexManticore = knex({
|
||||
client: 'mysql',
|
||||
connection: {
|
||||
|
||||
@@ -153,7 +153,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
|
||||
teasers,
|
||||
fingerprints,
|
||||
stashes,
|
||||
lastBatch: { id: lastBatchId },
|
||||
lastBatch,
|
||||
} = await promiseProps({
|
||||
scenes: knex('releases').whereIn('releases.id', sceneIds),
|
||||
channels: knex('releases')
|
||||
@@ -348,7 +348,7 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
|
||||
fingerprints: sceneFingerprints,
|
||||
stashes: sceneStashes,
|
||||
actorStashes: sceneActorStashes,
|
||||
lastBatchId,
|
||||
lastBatchId: lastBatch?.id,
|
||||
}, reqUser);
|
||||
}).filter(Boolean);
|
||||
}
|
||||
|
||||
2
static
2
static
Submodule static updated: 2af6f58ca1...c8ee47e181
Reference in New Issue
Block a user