forked from DebaucheryLibrarian/traxxx
Fixed Evil Angel upcoming and actor association issues. Moving from console.log to logger.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const knex = require('../knex');
|
||||
const logger = require('../logger');
|
||||
|
||||
async function upsert(table, items, identifier = ['id'], _knex) {
|
||||
const identifiers = Array.isArray(identifier) ? identifier : [identifier];
|
||||
@@ -28,8 +29,8 @@ async function upsert(table, items, identifier = ['id'], _knex) {
|
||||
});
|
||||
|
||||
if (knex) {
|
||||
console.log(`${table}: Inserting ${insert.length}`);
|
||||
console.log(`${table}: Updating ${update.length}`);
|
||||
logger.debug(`${table}: Inserting ${insert.length}`);
|
||||
logger.debug(`${table}: Updating ${update.length}`);
|
||||
|
||||
const [inserted, updated] = await Promise.all([
|
||||
knex(table).returning('*').insert(insert),
|
||||
|
||||
Reference in New Issue
Block a user