Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
feat: migrate cache to posgre (#326)
Browse files Browse the repository at this point in the history
* chore: partial migration to postgre

* feat: working session resuming

* fix: properly resume and saving session

Co-authored-by: Vann <stevanvincent05@gmail.com>

* chore: updates

Co-authored-by: Vann <stevanvincent05@gmail.com>

* feat: add database new schema (#328)

* chore: updates

Co-authored-by: Vann <stevanvincent05@gmail.com>

* chore: updates

* chore: updates

* fix: remove guilds relation

* feat: add more caches (#330)

* fix: typo on progress bar

* feat: cache key

---------

Co-authored-by: Vann-Dev <stevanvincent05@gmail.com>

* fix: we dont need embed at this time

* fix: remove unused cache

* feat: everything working as expected

Co-authored-by: Vann <stevanvincent05@gmail.com>

* fix: update return type

* chore: regen lock

---------

Co-authored-by: Vann <stevanvincent05@gmail.com>
  • Loading branch information
KagChi and Vann-Dev authored Feb 12, 2024
1 parent 7738c9e commit a748c95
Show file tree
Hide file tree
Showing 50 changed files with 2,236 additions and 651 deletions.
11 changes: 11 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import process from "node:process";
import type { Config } from "drizzle-kit";

export default {
schema: "./dist/schema/index.js",
out: "./drizzle",
driver: "pg",
dbCredentials: {
connectionString: process.env.DATABASE_URL!
}
} satisfies Config;
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export default [
{
rule: "new-cap",
option: ["off"]
},
{
rule: "no-await-in-loop",
option: ["off"]
}
]),
...modules,
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nezuchan/nezu-gateway",
"version": "3.4.1",
"version": "4.0.0",
"description": "A standalone service for connecting to the Discord gateway.",
"license": "GPL-3.0",
"author": "KagChi",
Expand Down Expand Up @@ -29,15 +29,18 @@
"discord-api-types": "^0.37.69",
"dockerode": "^4.0.2",
"dotenv": "^16.4.2",
"drizzle-orm": "^0.29.3",
"gradient-string": "^2.0.2",
"ioredis": "^5.3.2",
"kearsarge": "^1.0.3",
"pino": "^8.18.0",
"pino-pretty": "^10.3.1",
"postgres": "^3.4.3",
"prometheus-middleware": "^1.3.3",
"tslib": "^2.6.2",
"utf-8-validate": "^6.0.3",
"yaml": "^2.3.4"
"yaml": "^2.3.4",
"zlib-sync": "^0.1.9"
},
"devDependencies": {
"@hazmi35/eslint-config": "^13.3.1",
Expand All @@ -48,12 +51,13 @@
"@types/gradient-string": "^1.1.5",
"@types/node": "^20.11.17",
"@vladfrangu/async_event_emitter": "^2.2.4",
"drizzle-kit": "^0.20.14",
"eslint": "^8.56.0",
"pg": "^8.11.3",
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
},
"optionalDependencies": {
"pino-loki": "^2.2.1",
"zlib-sync": "^0.1.9"
"pino-loki": "^2.2.1"
}
}
Loading

0 comments on commit a748c95

Please sign in to comment.