add stripe (#121)
* add some stripe stuff * more stripe stuff * more stripe things * more stripr stuff * more stripe stuff * more stripe stuff * add more stuff * add more stripe stuff * more stuff * fix types
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { env } from "./env";
|
||||
import { isCloud } from "./utils/common";
|
||||
|
||||
let initialized = false;
|
||||
|
||||
/**
|
||||
@@ -9,11 +12,19 @@ export async function register() {
|
||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||
if (process.env.NEXT_RUNTIME === "nodejs" && !initialized) {
|
||||
console.log("Registering instrumentation");
|
||||
|
||||
const { EmailQueueService } = await import(
|
||||
"~/server/service/email-queue-service"
|
||||
);
|
||||
|
||||
await EmailQueueService.init();
|
||||
|
||||
/**
|
||||
* Send usage data to Stripe
|
||||
*/
|
||||
if (isCloud()) {
|
||||
await import("~/server/jobs/usage-job");
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user