move database scripts

deepsource-autofix-76c6eb20
Dan Gowans 2023-11-29 15:22:09 -05:00
parent 360e5e2565
commit 184cdd3fb7
570 changed files with 605 additions and 615 deletions

View File

@ -23,8 +23,8 @@ for (let index = 0; index < processCount; index += 1) {
activeWorkers.set(worker.process.pid, worker);
}
cluster.on('message', (worker, message) => {
for (const [pid, worker] of activeWorkers.entries()) {
if (worker === undefined || pid === message.pid) {
for (const [pid, activeWorker] of activeWorkers.entries()) {
if (activeWorker === undefined || pid === message.pid) {
continue;
}
debug(`Relaying message to worker: ${pid}`);

View File

@ -41,8 +41,8 @@ for (let index = 0; index < processCount; index += 1) {
}
cluster.on('message', (worker, message: WorkerMessage) => {
for (const [pid, worker] of activeWorkers.entries()) {
if (worker === undefined || pid === message.pid) {
for (const [pid, activeWorker] of activeWorkers.entries()) {
if (activeWorker === undefined || pid === message.pid) {
continue
}

View File

@ -1,4 +1,4 @@
import { calculateFeeAmount, calculateTaxAmount } from '../functions.fee.js';
import { calculateFeeAmount, calculateTaxAmount } from '../helpers/functions.fee.js';
import { getFee } from './getFee.js';
import { getLotOccupancy } from './getLotOccupancy.js';
import { acquireConnection } from './pool.js';

View File

@ -1,5 +1,5 @@
import type { LotOccupancy } from '../../types/recordTypes.js'
import { calculateFeeAmount, calculateTaxAmount } from '../functions.fee.js'
import type { LotOccupancy } from '../types/recordTypes.js'
import { calculateFeeAmount, calculateTaxAmount } from '../helpers/functions.fee.js'
import { getFee } from './getFee.js'
import { getLotOccupancy } from './getLotOccupancy.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
export async function addLotOccupantType(lotOccupantTypeForm, user) {
const database = await acquireConnection();

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
export async function addLotTypeField(lotTypeFieldForm, user) {
const database = await acquireConnection();

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
export async function addOccupancyTypeField(occupancyTypeFieldForm, user) {
const database = await acquireConnection();

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
export async function addOccupancyTypePrint(occupancyTypePrintForm, user) {
const database = await acquireConnection();

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
const recordNameColumns = new Map();
recordNameColumns.set('FeeCategories', 'feeCategory');

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import * as configFunctions from '../functions.config.js';
import * as configFunctions from '../helpers/functions.config.js';
import { acquireConnection } from './pool.js';
export async function cleanupDatabase(user) {
const database = await acquireConnection();

View File

@ -1,4 +1,4 @@
import * as configFunctions from '../functions.config.js'
import * as configFunctions from '../helpers/functions.config.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
export async function deleteOccupancyTypePrint(occupancyTypeId, printEJS, user) {
const database = await acquireConnection();

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js';
import { clearCacheByTableName } from '../helpers/functions.cache.js';
import { acquireConnection } from './pool.js';
const recordIdColumns = new Map();
recordIdColumns.set('FeeCategories', 'feeCategoryId');

View File

@ -1,4 +1,4 @@
import { clearCacheByTableName } from '../functions.cache.js'
import { clearCacheByTableName } from '../helpers/functions.cache.js'
import { acquireConnection } from './pool.js'

Some files were not shown because too many files have changed in this diff Show More