Last change
on this file since 20024 was 19510, checked in by tbretz, 5 years ago |
Takes care of the scheduler status.
|
File size:
640 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | function handleScheduler(wait_state)
|
---|
4 | {
|
---|
5 | var state = dim.state("SCHEDULER");
|
---|
6 | if (state===undefined)
|
---|
7 | return undefined;
|
---|
8 |
|
---|
9 | if (wait_state && wait_state.length>0 && state.name!=wait_state)
|
---|
10 | return wait_state;
|
---|
11 |
|
---|
12 | switch (state.name)
|
---|
13 | {
|
---|
14 | // Do-nothing conditions
|
---|
15 | case "Disconnected":
|
---|
16 | throw new Error("SCHEDULER: No connection to SQL database!");
|
---|
17 | return "";
|
---|
18 |
|
---|
19 | case "Armed":
|
---|
20 | return "";
|
---|
21 |
|
---|
22 | case "Connected":
|
---|
23 | dim.send("SCHEDULER/START");
|
---|
24 | return "Armed";
|
---|
25 |
|
---|
26 | }
|
---|
27 |
|
---|
28 | throw new Error("SCHEDULER:"+state.name+"["+state.index+"] unknown or not handled.");
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.