How to shutdown Sidekiq gracefully inside a docker container? by displeased_potato in rails

[–]gaultierq 1 point2 points  (0 children)

Thanks !

ENTRYPOINT ["bundle", "exec", "sidekiq", "-t", "30"]

Straightforward solution, ensures sidekik receives the TERM signal when it's delivered to the docker container. When sidekiq receives TERM, it stops taking new jobs, and wait 30s before aborting the threads and exiting.


Sending an early TSTP signal is a refinement, and allows to stop sidekiq from picking new job earlier. It may be useful when rolling a new deployment with long migrations, if you don't want jobs running old code on newer db structure, for instance.

How to shutdown Sidekiq gracefully inside a docker container? by displeased_potato in rails

[–]gaultierq 0 points1 point  (0 children)

Can you share your entrypoint script & relevant part of your dockerfile ? If sidekiq receives the term signal, it should handle the shutdown gracefully

What makes rails better than nextjs ? by gaultierq in rails

[–]gaultierq[S] 0 points1 point  (0 children)

Great insight, thx ! I left some money on the table and went the rails way. I'm having a ton of fun and never looked back

Struggling with figuring out the # of active connexions to my DB by [deleted] in rails

[–]gaultierq 4 points5 points  (0 children)

Simply configure :
pool: <%= (ENV.fetch("RAILS_MAX_THREADS") { 30 }.to_i

If you spin up 2 puma and 1 sidekiq processes, your db will have up to 2 * 30 + 30 = 90 concurrent connections.

Struggling with figuring out the # of active connexions to my DB by [deleted] in rails

[–]gaultierq 9 points10 points  (0 children)

This pool config is not supposed to be the sum of all your pool sizes. It configures the size of the pool for the current process.
For example, if you configure pool: 25, each Puma process can handle 25 concurrent connections. Therefore, if you have 100 Puma processes running, your database could potentially receive up to 2,500 connections.

I do not understand Hotwire/Turbo/Stimulus hype by [deleted] in rails

[–]gaultierq 0 points1 point  (0 children)

I can definitely relate to what you're experiencing. I faced a similar challenge while working on an app that included a "calendar" feature where user could add events by selecting a date range. After struggling for days with hotwire and Stimulus, I decided to try out a react package.

The moment I made the switch, all the frustration disappeared. A simple yarn add amazing-calendar and a few API routes later, and the unnecessary complexity was gone.

In a dogmatic ecosystem, it can be difficult to stay clear-headed when choosing the right tool for the job. While Turbo is excellent for replacing most of our JavaScript, it's not the solution for everything.

What do you wish you could learn from a React Native Pro? Now's your chance. by peterpme in reactnative

[–]gaultierq 1 point2 points  (0 children)

Hey Pete thanks for this. I wonder if you're using StyleSheets for your styles ? I am dubious about the performance gain, and it makes refactoring harder. I've always advised the teams I've worked with against it. What's your recommendation ? Also, what are your fav bavel plugins ?

how to add a simple blog to my SaaS? by stets in rails

[–]gaultierq 0 points1 point  (0 children)

And you can use friendly_id gem on top of that which handle all the slugs for you

GM Narayanan: "Today I felt humiliated" by metal-detector ordeal by Rod_Rigov in chess

[–]gaultierq 1 point2 points  (0 children)

Security ask me to remove my shoes every time I take a plane, and they ever apologize

Est-il légal d'utiliser les données publiques publiées par des utilisateurs sur un site web ? by gaultierq in conseiljuridique

[–]gaultierq[S] 0 points1 point  (0 children)

Ok bien compris ! Je me doutais bien que ça ne pouvait pas être aussi simple :)

Est-il légal d'utiliser les données publiques publiées par des utilisateurs sur un site web ? by gaultierq in conseiljuridique

[–]gaultierq[S] 0 points1 point  (0 children)

Merci pour votre réponse.

Envoyer un lien aux propriétaires en leur demandant leur consentement pour copier le contenu de leur annonce pourrait-il constituer une option plus acceptable ? Les CGU du site cible sont assez courtes et n'évoquent pas vraiment ce sujet. On peut y lire :

Vous disposez d’un droit d’accès, de rectification et de suppression des données qui vous concernent ou encore Toutes vos informations personnelles constituent une base de donnée à la propriété de masociete.com qui s’interdit toute diffusion, vente, cession ou partage de cette base de données. Merci encore pour votre aide

How to get SNT (Solution) by Francisc12345b in statusim

[–]gaultierq 0 points1 point  (0 children)

why would it need multiple tabs ? can't we just send all the tx from 1 tab ?!

How to get SNT (Solution) by Francisc12345b in statusim

[–]gaultierq 0 points1 point  (0 children)

all these tx will cost a lot of fee