fix: reduce vercel costs
This commit is contained in:
@@ -12,7 +12,7 @@ Sentry.init({
|
|||||||
enabled: process.env.NODE_ENV === "production",
|
enabled: process.env.NODE_ENV === "production",
|
||||||
|
|
||||||
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
||||||
tracesSampleRate: 1,
|
tracesSampleRate: 0.1,
|
||||||
|
|
||||||
// Enable logs to be sent to Sentry
|
// Enable logs to be sent to Sentry
|
||||||
enableLogs: true,
|
enableLogs: true,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Sentry.init({
|
|||||||
enabled: process.env.NODE_ENV === "production",
|
enabled: process.env.NODE_ENV === "production",
|
||||||
|
|
||||||
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
||||||
tracesSampleRate: 1,
|
tracesSampleRate: 0.1,
|
||||||
|
|
||||||
// Enable logs to be sent to Sentry
|
// Enable logs to be sent to Sentry
|
||||||
enableLogs: true,
|
enableLogs: true,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const size = {
|
|||||||
height: 630,
|
height: 630,
|
||||||
};
|
};
|
||||||
export const contentType = "image/png";
|
export const contentType = "image/png";
|
||||||
|
export const revalidate = 3600;
|
||||||
|
|
||||||
const radiusMap: Record<string, number> = {
|
const radiusMap: Record<string, number> = {
|
||||||
none: 0,
|
none: 0,
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ function getUserIdentifier(user: { email: string; username: string; githubUserna
|
|||||||
return user.githubUsername || (isUnclaimedAccount ? user.username : user.email);
|
return user.githubUsername || (isUnclaimedAccount ? user.username : user.email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const revalidate = 3600;
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const prompts = await db.prompt.findMany({
|
const prompts = await db.prompt.findMany({
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ function getUserIdentifier(user: {
|
|||||||
return user.githubUsername || user.username;
|
return user.githubUsername || user.username;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const revalidate = 3600;
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const prompts = await db.prompt.findMany({
|
const prompts = await db.prompt.findMany({
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const size = {
|
|||||||
height: 630,
|
height: 630,
|
||||||
};
|
};
|
||||||
export const contentType = "image/png";
|
export const contentType = "image/png";
|
||||||
|
export const revalidate = 3600;
|
||||||
|
|
||||||
const typeLabels: Record<string, string> = {
|
const typeLabels: Record<string, string> = {
|
||||||
TEXT: "Text Prompt",
|
TEXT: "Text Prompt",
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Sentry.init({
|
|||||||
integrations: [Sentry.replayIntegration()],
|
integrations: [Sentry.replayIntegration()],
|
||||||
|
|
||||||
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
|
||||||
tracesSampleRate: 1,
|
tracesSampleRate: 0.1,
|
||||||
// Enable logs to be sent to Sentry
|
// Enable logs to be sent to Sentry
|
||||||
enableLogs: true,
|
enableLogs: true,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user