Skip to content

Commit

Permalink
Merge branch 'forestgeo-app-acacia' of https://github.com/Smithsonian…
Browse files Browse the repository at this point in the history
…/ForestGEO into forestgeo-app-acacia
  • Loading branch information
siddheshraze committed Aug 26, 2024
2 parents 6af591e + 80f95f7 commit a8f7a67
Show file tree
Hide file tree
Showing 2 changed files with 679 additions and 1,131 deletions.
30 changes: 15 additions & 15 deletions frontend/components/processors/processormacros.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@ import { processCensus } from '@/components/processors/processcensus';
import { PoolMonitor } from '@/config/poolmonitor';
import { processPersonnel } from '@/components/processors/processpersonnel';

export async function getConn() {
let conn: PoolConnection | null = null;
try {
const i = 0;
conn = await getSqlConnection(i);
} catch (error: any) {
console.error('Error processing files:', error.message);
throw new Error(error.message);
}
if (!conn) {
throw new Error('conn empty');
}
return conn;
}

export interface SpecialProcessingProps {
connection: PoolConnection;
rowData: FileRow;
Expand Down Expand Up @@ -153,6 +138,21 @@ export async function getSqlConnection(tries: number): Promise<PoolConnection> {
}
}

export async function getConn() {
let conn: PoolConnection | null = null;
try {
const i = 0;
conn = await getSqlConnection(i);
} catch (error: any) {
console.error('Error processing files:', error.message);
throw new Error(error.message);
}
if (!conn) {
throw new Error('conn empty');
}
return conn;
}

export async function runQuery(connection: PoolConnection, query: string, params?: any[]): Promise<any> {
try {
// Check if the query is for calling a stored procedure
Expand Down
Loading

0 comments on commit a8f7a67

Please sign in to comment.