Commit afc27a86 authored by Steffen Michels's avatar Steffen Michels

Merge branch...

Merge branch '331-tasks-created-with-onstartup-containing-an-externalprocess-task-are-not-periodically-reevaluated-to-poll-for-new-data' into 'master'

Resolve "tasks created with onStartup containing an externalProcess task, are not periodically reevaluated to poll for new data"

Closes #331

See merge request !312
parents 594acdec 3a17a840
Pipeline #29266 passed with stage
in 5 minutes and 4 seconds
......@@ -49,7 +49,7 @@ where
(Error e, iworld) = (ExceptionResult e, iworld)
(Ok phpio, iworld) = eval phpio event evalOpts iworld
eval (ph, pio) DestroyEvent {TaskEvalOpts|taskId} iworld
eval (ph, pio) DestroyEvent {TaskEvalOpts|taskId} iworld
# iworld = clearTaskSDSRegistrations ('DS'.singleton taskId) iworld
= apIWTransformer iworld
$ liftOSErr (terminateProcess ph)
......@@ -57,7 +57,7 @@ where
>-= \_->tuple (Ok DestroyedResult)
//TODO: Support async sdss
eval (ph, pio) event {taskId,lastEval} iworld
| isRefreshForTask event taskId
| not (isRefreshForTask event taskId)
= (ValueResult NoValue (mkTaskEvalInfo lastEval) (mkUIIfReset event rep) (Task (eval (ph, pio))), iworld)
= apIWTransformer iworld $
read sdsout EmptyContext >-= \(ReadingDone (stdoutq, stderrq))->
Version: 1.4
ProjectRoot: .
Target: iTasks
Exec: {Project}*iTasks.WF.Tasks.IO.UnitTests
ByteCode: {Project}*iTasks.WF.Tasks.IO.UnitTests.bc
CheckStacks: False
CheckIndexes: True
OptimiseABC: True
GenerateByteCode: True
HeapSize: 20971520
StackSize: 512000
ExtraMemory: 8192
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
DisableRTSFlags: False
StandardRuntimeEnv: True
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Dynamics: True
GenericFusion: False
DescExL: True
Output: NoConsole
Font: Monaco
FontSize: 9
WriteStdErr: False
LinkMethod: Static
GenerateRelocations: False
GenerateSymbolTable: False
GenerateLinkMap: False
LinkResources: False
GenerateDLL: False
StripByteCode: True
KeepByteCodeSymbols: True
PrelinkByteCode: True
Path: {Project}
Path: {Project}*..*..*Libraries
Path: {Application}*lib*Dynamics
Path: {Application}*lib*GraphCopy
Path: {Application}*lib*ABCInterpreter
Path: {Application}*lib*StdEnv
Path: {Application}*lib*TCPIP
Path: {Application}*lib*Platform
Path: {Application}*lib*Platform*Deprecated*StdLib
Name: iTasks.WF.Tasks.Core.UnitTests
Dir: {Project}
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
module iTasks.WF.Tasks.IO.UnitTests
import Data.Functor
import iTasks
import iTasks.Extensions.Process
import iTasks.Util.Testing
import System.Time
import Data.Func
import Data.Tuple
import Testing.TestEvents
Start world = runUnitTests
[ {name="fastbusy", test=test {tv_sec=0,tv_nsec=1} "/bin/true" []}
, {name="slowbusy", test=test {tv_sec=0,tv_nsec=1} "/bin/sleep" ["5s"]}
, {name="fastpoll", test=test {tv_sec=0,tv_nsec=1000000} "/bin/true" []}
, {name="slowpoll", test=test {tv_sec=0,tv_nsec=1000000} "/bin/sleep" ["5s"]}
] world
test ts cmd args = (\w->(Passed, w)) o startEngine (onStartup $
withShared [] \stdin->withShared ([], []) \stdout->
externalProcess ts cmd args Nothing Nothing stdin stdout)
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