Warning: session_start(): open(/var/lib/php/sessions/sess_tj63kgo0rbnpu84cv2i0cqai99, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
srecord noeq G22AutoStarter(G22Utils g22utils) > MetaWithChangeListeners {
settableWithVar volatile bool enabled;
settable double initialDelay = 2;
new Flag started;
new Flag done;
L scripts = syncL();
event change;
record noeq AutoStartScript(G22LeftArrowScript script) > RunResultWithTimestamps {
run {
LASCompileResult cr = script.compileForAutoRun();
if (cr == null) cr = script.compileSaved();
run(-> cr.parsedScript().get());
}
}
void init() {
scripts.clear();
var scripts = conceptsWhere(g22utils.concepts, G22LeftArrowScript, runOnProjectOpen := true);
for (script : scripts)
this.scripts.add(new AutoStartScript(script));
change();
}
void start {
if (enabled && started.raise()) thread {
temp g22utils.backgroundProcessesUI.tempAdd("Auto-Start Scripts", );
sleepSeconds(initialDelay);
for (script : scripts) pcall {
if (!enabled) break;
script.run();
}
done.raise();
}
}
}