Skip to content

Commit

Permalink
switched from 'restart' to 'delete & start' for pm2 workers
Browse files Browse the repository at this point in the history
  • Loading branch information
rsiauko authored and karser committed Feb 3, 2023
1 parent 981debb commit b105ca0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .platform/hooks/postdeploy/10_start_workers.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/bash

## (re)start workers
pm2 restart /var/app/current/girderformindlogger/external/rq_worker.sh --name=worker_1
pm2 restart /var/app/current/girderformindlogger/external/rq_worker.sh --name=worker_2
## delete workers
pm2 delete all || echo 'No workers found'

## start workers
pm2 start /var/app/current/girderformindlogger/external/rq_worker.sh --name=worker_1
pm2 start /var/app/current/girderformindlogger/external/rq_worker.sh --name=worker_2

## start scheduler
pm2 restart /var/app/current/girderformindlogger/external/rq_scheduler.sh
pm2 start /var/app/current/girderformindlogger/external/rq_scheduler.sh

0 comments on commit b105ca0

Please sign in to comment.