Commit Graph

41 Commits

Author SHA1 Message Date
Ajay
10491da7c2 Raise timeout 2022-07-22 17:27:32 -04:00
Ajay
b616ac990b Add statement timeout for read 2022-07-22 16:39:31 -04:00
Ajay
96a75a8335 Add retry logic to postgres requests
Maybe solves https://github.com/ajayyy/SponsorBlockServer/issues/487
2022-07-20 14:42:04 -04:00
Ajay
1e441c3ebf Only use read replica for shorter queries
Help with https://github.com/ajayyy/SponsorBlockServer/issues/487
2022-07-20 00:40:07 -04:00
Ajay
f4b66d30ec Use pool query since this should catch idle errors
https://github.com/brianc/node-postgres/issues/1324#issuecomment-623311914

Helps with https://github.com/ajayyy/SponsorBlockServer/issues/487
2022-07-20 00:31:51 -04:00
Ajay
ebee00322a remove client error listener completely 2022-06-30 18:11:02 -04:00
Ajay
edff48d258 Don't release client on client error 2022-06-30 17:50:15 -04:00
Ajay
3844404637 ctch client connection errors 2022-06-30 02:00:59 -04:00
Ajay
5057c86707 Fix read only db used by default 2022-06-30 01:38:58 -04:00
Ajay
b1b40d410f Prevent errors from double calling release 2022-06-30 01:37:50 -04:00
Ajay
54db2c8c10 Release client on error 2022-06-27 19:47:29 -04:00
Ajay
86e61c778c Fix fail calculation 2022-06-25 12:30:16 -04:00
Ajay
e615d7c032 Fix warnings 2022-06-25 12:03:30 -04:00
Ajay
08003bc2f2 Switch postgres instances if there is a failure 2022-06-25 12:02:01 -04:00
Ajay
1a232600a1 Add option to cycle between multiple postgres instances 2022-06-25 01:41:45 -04:00
Ajay
a8d0336cae Don't crash on postgres errors 2022-06-24 17:20:48 -04:00
Ajay
b0bcf2b684 don't specify tablespace 2022-05-04 16:03:56 -04:00
Ajay
2e4b7a0c9c Don't force encoding 2022-05-04 15:36:51 -04:00
Ajay Ramachandran
6919b5433b Add suggested chapter names 2021-11-06 22:43:03 -04:00
Ajay Ramachandran
3873aa61bc Release client even if an error occurs
#372
2021-09-28 09:50:24 -04:00
Ajay Ramachandran
39baa4871a Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer 2021-09-27 20:17:24 -04:00
Ajay Ramachandran
9d2c5ed74e Call connect manually to catch errors
Fix #372
2021-09-27 20:17:02 -04:00
Michael C
a028eaa41a object-curly-spacing 2021-09-22 18:52:35 -04:00
Michael C
1c2dd055c1 Update dependencies & eslint
- update API-Docs link
- cast err as string to appease eslint
- update package and bump minimum to fix security issue
- removed unnecessary filters from gitignore
2021-08-27 17:09:31 -04:00
Ajay Ramachandran
f24c962785 Catch postgres exceptions
Fix #338
2021-08-10 09:50:32 -04:00
Ajay Ramachandran
3a8076fc3c Indent switch case 2021-08-02 16:25:04 -04:00
Michael C
b5a29675d6 fix more non-format string-concat 2021-07-12 02:48:49 -04:00
Michael C
c0b1d201ad fix non-format eslint in src/ 2021-07-12 02:12:22 -04:00
Michael C
d89b26b77d fix eslint-errors 2021-07-04 01:36:03 -04:00
Nanobyte
fb87e180da Fix postgres type cast
Postgres is handling numbers as 64bit and requires special handling to prevent returning numbers as string
2021-06-22 00:59:22 +02:00
Ajay Ramachandran
cfbf8a47d7 Fix hashing function 2021-04-02 12:03:21 -04:00
Ajay Ramachandran
46524e4298 Fix indexes 2021-03-26 19:02:32 -04:00
Ajay Ramachandran
11b4f642a6 Apply indexes after upgrades 2021-03-21 19:16:56 -04:00
Ajay Ramachandran
8729796e87 Make tests pass running with postgres 2021-03-07 00:21:56 -05:00
Ajay Ramachandran
e9b7eac289 Finish up conversion to use case-sensitive column names 2021-03-04 23:29:01 -05:00
Ajay Ramachandran
2772a9dcc6 Switch to case sensitive and get submitting + getting working 2021-03-04 20:23:05 -05:00
Ajay Ramachandran
1a66be8665 Make schemas work with postgres 2021-03-04 19:44:54 -05:00
Ajay Ramachandran
2c211d4730 Fix preprocessor not being used for initial schema 2021-03-01 22:40:13 -05:00
Ajay Ramachandran
88855ab695 Support schema upgrading with postgres 2021-03-01 22:20:44 -05:00
Ajay Ramachandran
46b42da5bd Update tests to use promises 2021-03-01 21:37:35 -05:00
Ajay Ramachandran
ff4af3786e Switch to postgres + promises 2021-03-01 20:40:31 -05:00