Skip to content

Commit

Permalink
Redis: properly split background services from sleep commands
Browse files Browse the repository at this point in the history
Restore functionality for redis - start redis (background) then sleep 10 (non-background)
add sleep to before_db_migrate
  • Loading branch information
featheredtoast committed Oct 31, 2023
1 parent e05b0ff commit b6e9371
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/redis.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,18 @@ run:
- exec:
background: true
tag: db
cmd:
- exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
- sleep 10
cmd: exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
- exec:
tag: db
cmd: sleep 10

# we can not migrate without redis, launch it if needed
hooks:
before_db_migrate:
- exec:
background: true
cmd: exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
- exec: sleep 10
after_code:
- replace:
filename: /etc/service/unicorn/run
Expand Down

0 comments on commit b6e9371

Please sign in to comment.