MCPcopy
hub / github.com/MrNothing/AI-Blocks / Run

Method Run

Sources/src/Model/UI/RunningItems.js:20–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 }
19
20 Run()
21 {
22 if(window.service.project!=null)
23 {
24 let tmpDir = os.tmpdir();
25
26 console.log("tmpDir: "+tmpDir)
27
28 if(window.service.running==false)
29 {
30 window.service.running = true;
31 window.service.t0 = performance.now();
32 window.service.log("Building project: "+window.service.project.projectname, "", 1);
33
34 for(let u in window.service.charts)
35 {
36 window.service.charts[u].clearChart();
37 }
38
39 let builder = new ProjectBuilder(tmpDir);
40 builder.BuildProject(true);
41 if(builder.success)
42 {
43 window.service.logs = [];
44 let runner = new ProjectRunner(tmpDir)
45 window.service.builder = builder;
46 }
47 else
48 {
49 window.service.running = false;
50 }
51 }
52 else
53 {
54 window.service.log("this project is already running!", "", 1);
55 }
56 }
57 }
58
59 Stop()
60 {

Callers 8

RunFunction · 0.45
RunFunction · 0.45
RunFunction · 0.45
RunFunction · 0.45
RunFunction · 0.45
RunFunction · 0.45
RunFunction · 0.45
TrainFunction · 0.45

Calls 3

BuildProjectMethod · 0.95
logMethod · 0.80
clearChartMethod · 0.80

Tested by 1

RunFunction · 0.36