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

34
LINES

< > BotCompany Repo | #1005952 // conceptsAndBot

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

Transpiled version (20105L) is out of date.

1  
volatile sbool conceptsAndBot_running;
2  
sbool conceptsAndBot_thinOnStart = true;
3  
4  
static void conceptsAndBot() {
5  
  conceptsAndBot(null);
6  
}
7  
8  
static void conceptsAndBot(Int autoSaveInterval) {
9  
  if (conceptsAndBot_running) ret;
10  
  conceptsAndBot_running = true;
11  
  
12  
  Concepts cc = db_mainConcepts();
13  
  cc.programID = getDBProgramID();
14  
  
15  
  try {
16  
    if (cc.useFileLock) {
17  
      if (!cc.fileLock().tryToLock()) {
18  
        ensureDBNotRunning(dbBotStandardName());
19  
        cc.fileLock().forceLock();
20  
      }
21  
    } else
22  
      ensureDBNotRunning(dbBotStandardName());
23  
  } on fail e {
24  
    printStackTrace(e);
25  
    cc.dontSave = true; // SAFETY
26  
  }
27  
  
28  
  cc.persist(autoSaveInterval);
29  
  dbBot(false);
30  
  
31  
  if (conceptsAndBot_thinOnStart) pcall {
32  
    thinAProgramsBackups(getDBProgramID(), true);
33  
  }
34  
}

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/14
Text MD5: 7faaa3e3319fcf1e5df42bd63bdf58b3
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-12 23:55:38
Source code size: 820 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 786 / 921
Version history: 13 change(s)
Referenced in: [show references]