Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Misc

Edward Cui9a3f2f62a689
diff --git a/server/src/index.ts b/server/src/index.ts
index 748bf0905..616f45610 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -70,6 +70,7 @@ import { siteConfig } from "./lib/siteConfig.js";
import { trackEvent } from "./tracker/trackEvent.js";
import { extractSiteId, isSitePublic } from "./utils.js";
import { importData } from "./api/importData.js";
+import boss from "./lib/boss.js";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
@@ -335,9 +336,12 @@ const start = async () => {
// Load site configurations cache
await siteConfig.loadSiteConfigs();
+ await boss.start();
+
// Start the server
await server.listen({ port: 3001, host: "0.0.0.0" });
} catch (err) {
+ await boss.stop();
server.log.error(err);
process.exit(1);
}
diff --git a/server/src/lib/boss.ts b/server/src/lib/boss.ts
index 51d7390f6..cb8202eca 100644
--- a/server/src/lib/boss.ts
+++ b/server/src/lib/boss.ts
@@ -10,7 +10,7 @@ const boss = new PgBoss({
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
schema: "pgboss",
- application_name: "data-import-jobs",
+ application_name: "data-import-system",
});
boss.on("error", error => console.error(error));