Repository navigation
Commit 119a4e9
committed
Fix self-update hanging at the health-check step
Root cause: the updater was spawned as a child of the API process. PM2 restarts a
process by tree-killing its descendants, so when the script ran 'pm2 reload', the API
restart killed the script mid health-check — freezing the status at 'Redémarrage et
vérification de l'état…' forever.
- version.ts: launch the updater from a throwaway 'bash -c' that backgrounds it and
exits immediately, so it is reparented to init (ppid 1) and detached via setsid. The
reload can no longer reap it.
- self-update.sh: reload only opencoperlock-api and opencoperlock-web by name (graceful,
with a restart fallback) instead of the whole ecosystem — never touching a project-local
Postgres, and fixing the case where only the web process was being restarted.1 parent 1883079 commit 119a4e9
2 files changed
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
187 | 196 | | |
188 | 197 | | |
189 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 46 | + | |
49 | 47 | | |
| 48 | + | |
50 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
| |||
0 commit comments