Skip to content

Commit

Permalink
fix: delaying for three seconds while waiting to supervisorctl to be …
Browse files Browse the repository at this point in the history
…idle (issue #833) (#842)

Co-authored-by: Igor Pellinen <[email protected]>
  • Loading branch information
igronus and Igor Pellinen authored Oct 24, 2024
1 parent c505b5b commit fda21cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/docker-sync/sync_strategy/native_osx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def start_container
cmd = "docker run -d -v \"#{volume_app_sync_name}:/app_sync\" -v \"#{host_sync_src}:/host_sync#{host_disk_mount_mode}\" -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync #{tz_expression} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image}"
else
say_status 'ok', "starting #{container_name} container", :white if @options['verbose']
cmd = "docker start #{container_name} && docker exec #{container_name} supervisorctl restart unison"
cmd1 = "docker start #{container_name}"
cmd2 = "docker exec #{container_name} supervisorctl restart unison"
cmd = "#{cmd1} && (#{cmd2} || (sleep 3 && #{cmd2})) || exit 1"
end
else
say_status 'ok', "#{container_name} container still running, restarting unison in container", :blue
Expand Down

0 comments on commit fda21cf

Please sign in to comment.