In line 45 of getSchedule.js
Is a bug just waiting to jump at people; the value of task depends on the order of elements inside measurementType to be exactly the same as in the DB table, which is this today:
mysql> mysql> select * from MeasurementType;
+---------------------+----------------------+--------------+--------------+-----------------------------------------------------------------------------------------------------------------------+
| fMeasurementTypeKey | fMeasurementTypeName | fIsUnlimited | fNeedsSource | fMeasurementType |
+---------------------+----------------------+--------------+--------------+-----------------------------------------------------------------------------------------------------------------------+
| 0 | Startup | 0 | 0 | startup including drs-calib and single-pe run |
| 1 | Idle | 1 | 0 | doing nothing |
| 2 | DrsCalib | 0 | 0 | drs-calibration |
| 3 | SinglePE | 0 | 0 | single-pe run |
| 4 | Data | 1 | 1 | data of a source |
| 5 | Ratescan | 0 | 0 | ratescan, ra/dec or source need to be given |
| 6 | Shutdown | 1 | 0 | shutdown including single-pe run |
| 7 | OVTest | 0 | 0 | OverVoltage measurement |
| 8 | Ratescan2 | 0 | 0 | ratescan consisting of 2 ratescans with different step size; more info on trac.fact-project.org/wiki/SpecialRatescans |
| 9 | Sleep | 0 | 0 | telescope is parked, lid is closed and then nothing is done until the next observation |
| 10 | Custom | 0 | 0 | Custom run with certain threshold and duration |
+---------------------+----------------------+--------------+--------------+-----------------------------------------------------------------------------------------------------------------------+
11 rows in set (0.06 sec)
In line 45 of getSchedule.js Is a bug just waiting to jump at people; the value of
task
depends on the order of elements insidemeasurementType
to be exactly the same as in the DB table, which is this today:This is close to insane.