Skip to content

Commit

Permalink
Extend serverless function duration
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-gordon committed Oct 31, 2023
1 parent e910229 commit 61c2a99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions api/data/import.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { VercelRequest, VercelResponse } from "@vercel/node";
import { parse } from "csv-parse/sync";

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import type { Readable } from "node:stream";
export const maxDuration = 60; // 1 minutes

/**
* Receives text/csv content in post request
Expand Down
2 changes: 2 additions & 0 deletions api/prompt/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { stringify } from "graph-selector";

type PromptType = "knowledge" | "flowchart";

export const maxDuration = 60 * 5; // 5 minutes

const handler: VercelApiHandler = async (req, res) => {
const { subject, promptType, accentClasses = [] } = req.body;
if (!subject || !promptType || !isPromptType(promptType)) {
Expand Down

0 comments on commit 61c2a99

Please sign in to comment.