Commit 712cfa3e authored by Haye Böhm's avatar Haye Böhm

Fix CI as much as possible (linking Remote examples should still fail)

parent c6428a60
Pipeline #16646 passed with stage
in 4 minutes and 36 seconds
module minimal
import iTasks
import iTasks.Internal.Distributed.Instance
import qualified iTasks.Extensions.Distributed.SDS as D
import Data.Func
import Data.Tuple
import Data.Maybe
import Data.Functor
sharedShare = sharedStore "sharedshare" 42
mainTask = viewInformation "Choose your role" [] ()
>>* [OnAction (Action "Domain server") $ always domainServer
,OnAction (Action "Client") $ always client
]
where
domainServer = instanceServer 8123 (Domain "localhost")
||- (updateSharedInformation "This share is shared between machines" [] sharedShare @! ())
client = instanceClient "localhost" 8123 (Domain "localhost")
||- (forever
$ 'D'.get sharedShare
>>= viewInformation "This share is shared between machines" []
>>* [OnAction (Action "Refresh") $ always $ return ()])
Start :: *World -> *World
Start world
= startEngineWithOptions opts mainTask world
where
opts [] = \op->(Just {op&distributed=True}, ["Started server on port: " +++ toString op.serverPort])
opts ["-p",p:as] = appFst (fmap (\o->{o & serverPort=toInt p})) o opts as
opts [a:as] = opts as
module RemoteShareExamples
import iTasks
import iTasks.Internal.Distributed.Instance
import Data.Func
import Data.Tuple
......@@ -152,4 +151,4 @@ where
//# getV = get doubleRemote >>= viewInformation "View the value gotten for double remote by GET" []
//# updV = enterInformation "Enter the new value for the number" [] >>= \n. upd (\_. n) doubleRemote >>= viewInformation "Updated value" []
# shaV = updateSharedInformation "Update value by viewSharedInformation" [] doubleRemote
= shaV @! ()
\ No newline at end of file
= shaV @! ()
......@@ -14,7 +14,7 @@ from iTasks.UI.Editor.Modifiers import comapEditorValue, instance tune UIAttribu
from iTasks.UI.Editor.Controls import htmlView
from iTasks.UI.Definition import paddingAttr, :: UIAttributes
from Text.HTML import :: HtmlTag(ImgTag), :: HtmlAttr(SrcAttr,StyleAttr,AltAttr)
from iTasks.UI.Tune import <<@, class tune
from iTasks.WF.Combinators.Tune import <<@, class tune
derive gText JPEGPicture
derive JSONEncode JPEGPicture
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment