Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

31
LINES

< > BotCompany Repo | #1005952 - conceptsAndBot

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (13689L/94K).

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();
  try {
    if (cc.useFileLock) {
      if (!cc.fileLock().tryToLock()) {
        ensureDBNotRunning(dbBotStandardName());
        cc.fileLock().forceLock();
      }
    } else
      ensureDBNotRunning(dbBotStandardName());
  } on fail {
    cc.dontSave = true; // SAFETY
  }
  
  cc.persist(autoSaveInterval);
  dbBot(false);
  
  if (conceptsAndBot_thinOnStart) pcall {
    thinAProgramsBackups(getDBProgramID(), true);
  }
}

Author comment

Began life as a copy of #1005329

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, qsqiayxyrbia, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1005952
Snippet name: conceptsAndBot
Eternal ID of this version: #1005952/12
Text MD5: 1de93cc09e7801c626eebff92a6ff39c
Transpilation MD5: 896135a7e0a0232bda2b44fd7104066b
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-18 02:32:28
Source code size: 753 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 592 / 655
Version history: 11 change(s)
Referenced in: [show references]