git.iko.soy/distributed-process
on master help sign in
Don't hardcode remote path
commit0136520c17dde6b55457c10265cebd5d9158e84e authorEdsko de Vries <edsko@well-typed.com> dateWed 1 Aug 2012, 16:14 (14 years ago) parent070b0dc
2 files changed+2−5
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure.hs+1−1 distributed-process-azure/src/Control/Distributed/Process/Backend/Azure/CommandLine.hs+1−4
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure.hs+1−1
@@ -133,7 +133,7 @@ apiCopyToVM params vm =
133133apiRunOnVM :: AzureParameters -> VirtualMachine -> String -> Closure (Process ()) -> IO ()
134134apiRunOnVM params vm port proc =
135135 void . withSSH2 params vm $ \fd s -> do
136− let exe = "/home/edsko/" ++ azureSshRemotePath params
136+ let exe = "PATH=. " ++ azureSshRemotePath params
137137 ++ " onvm run "
138138 ++ " --host " ++ vmIpAddress vm
139139 ++ " --port " ++ port
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure/CommandLine.hs+1−4
@@ -139,15 +139,12 @@ onVmRun :: RemoteTable -> String -> String -> IO ()
139139onVmRun rtable host port = do
140140 hSetBinaryMode stdin True
141141 proc <- BSL.getContents :: IO BSL.ByteString
142− putStrLn $ "Got closure encoding of length " ++ show (BSL.length proc)
143142 mTransport <- createTransport host port defaultTCPParameters
144143 case mTransport of
145144 Left err -> throwIO err
146145 Right transport -> do
147146 node <- newLocalNode transport rtable
148− runProcess node $ do
149− liftIO $ putStrLn "Starting remote node"
150− catch (join . unClosure . decode $ proc) (\e -> liftIO $ print (e :: SomeException))
147+ runProcess node $ join . unClosure . decode $ proc
151148
152149--------------------------------------------------------------------------------
153150-- Command line options --