Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Sequelize backup errors on Sentry #899

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/feature_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test feature branch

on:
push:
branches-ignore: 'master'
branches-ignore: ['master']

jobs:
tests:
Expand All @@ -25,6 +25,8 @@ jobs:
sidebar,
yearselector,
evaluation,
metaevaluation,
homepage,
]
name: Run tests
runs-on: ubuntu-latest
Expand All @@ -35,8 +37,8 @@ jobs:
- name: npm ci
run: npm ci --no-audit --no-fund

- name: docker-compose up -d
run: docker-compose up -d
- name: docker compose up -d
run: docker compose up -d

- name: seed db
run: docker exec lomake_dev bash -c "node index.js seed"
Expand Down
9 changes: 9 additions & 0 deletions config/sequelize.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { Sequelize } = require('@models/index')

module.exports = {
development: {
database_url: process.env.DATABASE_URL,
Expand All @@ -22,5 +24,12 @@ module.exports = {
define: {
underscored: true,
},
// https://stackoverflow.com/questions/71846885/in-sequelize-connection-i-am-getting-operation-timeout-error-how-to-fix-this-is
retry: {
match: [/Deadlock/i, Sequelize.ConnectionError], // Retry on connection errors
max: 3,
backoffBase: 3000,
backoffExponent: 1.5,
},
},
}
Loading