Skip to content

Commit

Permalink
clode idle\
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtnd committed Nov 18, 2024
1 parent 16803fb commit 610cf5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handlers/getNetflows.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { IResponse, successResponse, errorResponse } from "../utils/lambda-response";
import wrap from "../utils/wrap";
import { getNetflows } from "../utils/wrappa/postgres/query";
import { closeIdleConnections } from "../utils/wrappa/postgres/write";

const handler = async (event: AWSLambda.APIGatewayEvent): Promise<IResponse> => {
await closeIdleConnections();
const period = event.pathParameters?.period?.toLowerCase() as "day" | "week" | "month";

if (!period || !["day", "week", "month"].includes(period)) {
Expand Down

0 comments on commit 610cf5e

Please sign in to comment.