volatile sbool conceptsAndBot_running; sbool conceptsAndBot_thinOnStart = true; static void conceptsAndBot() { conceptsAndBot(null); } static void conceptsAndBot(Int autoSaveInterval) { if (conceptsAndBot_running) ret; conceptsAndBot_running = true; Concepts cc = db_mainConcepts(); cc.programID = getDBProgramID(); try { if (cc.useFileLock) { if (!cc.fileLock().tryToLock()) { ensureDBNotRunning(dbBotStandardName()); cc.fileLock().forceLock(); } } else ensureDBNotRunning(dbBotStandardName()); } on fail e { printStackTrace(e); cc.dontSave = true; // SAFETY } cc.persist(autoSaveInterval); dbBot(false); if (conceptsAndBot_thinOnStart) pcall { thinAProgramsBackups(getDBProgramID(), true); } }