setup_app_dir needs to be called under lock
@@ -1911,8 +1911,10 @@ class Djinn
# Next, restart any apps that have new code uploaded.
unless apps_to_restart.empty?
apps_to_restart.each { |appid|
+ APPS_LOCK.synchronize {
# Make sure we have the latest code deployed.
setup_app_dir(appid, true)
+ }
location = "#{PERSISTENT_MOUNT_POINT}/apps/#{appid}.tar.gz"
begin
ZKInterface.clear_app_hosters(appid)
@@ -1965,9 +1967,11 @@ class Djinn
# can take some time, we do it in a thread.
Thread.new {
restart_apps.each{ |app|
+ APPS_LOCK.synchronize {
setup_app_dir(app, true)
}
}
+ }
return "OK"
end
