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

feat: sequelize registration with timeout and retry #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kanthgithub
Copy link
Contributor

@kanthgithub kanthgithub commented Jul 30, 2024

sequelize registration with timeout and retry

Description

  • Fastify server registration happens with Sequelize Plugin during startup
  • If the Database connection is not established or taking longer time, then Plugin will throw Error
FastifyError [Error]: Plugin did not start in time: 'sequelizePlugin'. You may have forgotten to call 'done' function or to resolve a Promise
July 30, 2024 at 18:30 (UTC+2:00)
	
code: 'AVV_ERR_PLUGIN_EXEC_TIMEOUT',
	
arka
July 30, 2024 at 18:30 (UTC+2:00)
	
statusCode: 500,

Fix

  • Add a new async function which does retry with timeout for the sequelize plugin registration with server

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

@kanthgithub kanthgithub self-assigned this Jul 30, 2024
@kanthgithub kanthgithub added the bug Something isn't working label Jul 30, 2024
Copy link

Deploying arka with  Cloudflare Pages  Cloudflare Pages

Latest commit: a869a3c
Status: ✅  Deploy successful!
Preview URL: https://99de8fb6.arka-3qg.pages.dev
Branch Preview URL: https://feature-sequelize-connection.arka-3qg.pages.dev

View logs

Copy link
Member

@ch4r10t33r ch4r10t33r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

3 participants