TO DO: reactivePoll in script module server + further testing
I went with an approach where we check each progress file for the text run finished. Storing the file that have this text are marked as finished_models and are stored in r. Based on this, we determine how many model we still have to do and if we should keep running invalidateLater. When everything is finished, everything should be in final state:
r$models_running is 0
r$finished_models contain the filenames of all finished progress files
r$model_updated should be equal to how many times a models were run
When running new models, the initial state should be:
r$models_running equal to amount of models to be run
r$finished_models will check if a run number (e.g. run1 is already in r$finished_models, when it is, it will delete it from this object- making sure we know that it needs to be finalised again)
TO DO:
reactivePoll
in script module server + further testingI went with an approach where we check each progress file for the text
run finished
. Storing the file that have this text are marked asfinished_models
and are stored inr
. Based on this, we determine how many model we still have to do and if we should keep runninginvalidateLater
. When everything is finished, everything should be in final state:r$models_running
is 0r$finished_models
contain the filenames of all finished progress filesr$model_updated
should be equal to how many times a models were runWhen running new models, the initial state should be:
r$models_running
equal to amount of models to be runr$finished_models
will check if a run number (e.g.run1
is already inr$finished_models,
when it is, it will delete it from this object- making sure we know that it needs to be finalised again)