Commit c72eb17ad263309ebf49954ca93194932468d25e

Authored by Jeremy
1 parent 678838ed
Exists in master and in 1 other branch dev

Update celery task

images_folder/simulation_1/analysis/analysis.result deleted
... ... @@ -1,3 +0,0 @@
1   -Source folder = /home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder
2   -Plan folder = simulation_1
3   -duration = 0.00011574074074074075
images_folder/simulation_1/calibrations/calibration0.result deleted
... ... @@ -1,3 +0,0 @@
1   -Source folder = /home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder
2   -Source plan = simulation_1
3   -image number = 0
images_folder/simulation_1/vis_image_0 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_1 5 0.00011574074074074075
2 0 \ No newline at end of file
images_folder/simulation_1/vis_image_1 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_1 5 0.00011574074074074075
2 0 \ No newline at end of file
images_folder/simulation_1/vis_image_2 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_1 5 0.00011574074074074075
2 0 \ No newline at end of file
images_folder/simulation_1/vis_image_3 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_1 5 0.00011574074074074075
2 0 \ No newline at end of file
images_folder/simulation_1/vis_image_4 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_1 5 0.00011574074074074075
2 0 \ No newline at end of file
images_folder/simulation_2/analysis/analysis.result deleted
... ... @@ -1,3 +0,0 @@
1   -Source folder = /home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder
2   -Plan folder = simulation_2
3   -duration = 0.0011574074074074073
images_folder/simulation_2/calibrations/calibration0.result deleted
... ... @@ -1,3 +0,0 @@
1   -Source folder = /home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder
2   -Source plan = simulation_2
3   -image number = 0
images_folder/simulation_2/vis_image_0 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_2 5 0.0011574074074074073
2 0 \ No newline at end of file
images_folder/simulation_2/vis_image_1 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_2 5 0.0011574074074074073
2 0 \ No newline at end of file
images_folder/simulation_2/vis_image_2 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_2 5 0.0011574074074074073
2 0 \ No newline at end of file
images_folder/simulation_2/vis_image_3 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_2 5 0.0011574074074074073
2 0 \ No newline at end of file
images_folder/simulation_2/vis_image_4 deleted
... ... @@ -1 +0,0 @@
1   -/home/jeremy/Desktop/Development/Irap/PYROS/src/../images_folder/simulation_2 5 0.0011574074074074073
2 0 \ No newline at end of file
install/install.py
... ... @@ -478,7 +478,7 @@ class Config:
478 478 return self.__content
479 479  
480 480 class Installer(AInstaller):
481   - sql = "CREATE DATABASE IF NOT EXISTS pyros; CREATE USER IF NOT EXISTS pyros; GRANT USAGE ON *.* TO 'pyros'; DROP USER 'pyros'; GRANT ALL ON pyros.* TO 'pyros'@'localhost' IDENTIFIED BY 'DjangoPyros'; GRANT ALL ON test_pyros.* TO 'pyros'@'localhost'"
  481 + sql = "CREATE DATABASE IF NOT EXISTS pyros; CREATE DATABASE IF NOT EXISTS pyros_test; CREATE USER IF NOT EXISTS pyros; GRANT USAGE ON *.* TO 'pyros'; DROP USER 'pyros'; GRANT ALL ON pyros.* TO 'pyros'@'localhost' IDENTIFIED BY 'DjangoPyros'; GRANT ALL ON test_pyros.* TO 'pyros'@'localhost'"
482 482 db_user = "pyros"
483 483 db_password = "DjangoPyros"
484 484  
... ...
pyros.py
... ... @@ -452,23 +452,6 @@ class Pyros(AManager):
452 452  
453 453 def test_all(self):
454 454 self.unittest()
455   -
456   - # TODO Fix this
457   - # self.changeDirectory("src")
458   - # self.replacePatternInFile("CELERY_TEST = False", "CELERY_TEST = True", "pyros/settings.py")
459   - # self.execProcess("rm -f testdb.sqlite3")
460   - # self.changeDirectory("..")
461   - #
462   - # self.migrate()
463   - # self.loaddata()
464   - # self.sims_launch()
465   - # self.singleWorker("alert_manager")
466   - # self.changeDirectory("src")
467   - # self.execProcessFromVenv(self.venv_bin + " manage.py test alert_manager.tests.AlertListenerTestsCelery --keepdb --nomigrations")
468   - # self.replacePatternInFile("CELERY_TEST = True", "CELERY_TEST = False", "pyros/settings.py")
469   - # self.execProcess("rm -f testdb.sqlite3")
470   - # self.changeDirectory("..")
471   - # self.kill_simulation()
472 455 return 0
473 456  
474 457 def loaddata(self):
... ... @@ -485,6 +468,7 @@ class Pyros(AManager):
485 468  
486 469 self.execProcessFromVenvAsync(self.venv_cel + " worker -A pyros -Q scheduling_q --purge -n pyros@scheduling -c 1")
487 470 self.execProcessFromVenvAsync(self.venv_cel + " worker -A pyros -Q execute_plan_vis_q --purge -n pyros@execute_plan_vis -c 1")
  471 + self.execProcessFromVenvAsync(self.venv_cel + " worker -A pyros -Q night_calibrations_q --purge -n pyros@night_calibrations -c 1")
488 472 self.execProcessFromVenvAsync(self.venv_cel + " worker -A pyros -Q execute_plan_nir_q --purge -n pyros@execute_plan_nir -c 1")
489 473 self.execProcessFromVenvAsync(self.venv_cel + " worker -A pyros -Q create_calibrations_q --purge -n pyros@create_calibrations -c 1")
490 474 self.execProcessFromVenvAsync(self.venv_cel + " worker -A pyros -Q analysis_q --purge -n pyros@analysis -c 1")
... ... @@ -554,12 +538,20 @@ class Pyros(AManager):
554 538 self.kill_simulation()
555 539 return 0
556 540  
  541 + def reset_database_sim(self):
  542 + self.changeDirectory("src")
  543 + self.replacePatternInFile("CELERY_TEST = False", "CELERY_TEST = True", "pyros/settings.py")
  544 + self.execProcess("echo 'yes' |'" + self.venv_bin + "' manage.py flush")
  545 + self.replacePatternInFile("CELERY_TEST = False", "CELERY_TEST = True", "pyros/settings.py")
  546 + self.changeDirectory("..")
  547 +
557 548 def simulator(self):
558 549 self.changeDirectory("src")
559 550 self.replacePatternInFile("CELERY_TEST = False", "CELERY_TEST = True", "pyros/settings.py")
560 551 self.replacePatternInFile("SIMULATOR = False", "SIMULATOR = True", "pyros/settings.py")
561 552 self.execProcess("rm -f testdb.sqlite3")
562 553 self.changeDirectory("..")
  554 + self.reset_database_sim()
563 555 self.migrate()
564 556 self.loaddata()
565 557 self.server()
... ... @@ -688,6 +680,7 @@ class Pyros(AManager):
688 680 "reset_config": self.reset_config,
689 681 "test_all": self.test_all,
690 682 "celery_on": self.celery_on,
  683 + "reset_database_sim": self.reset_database_sim,
691 684 "init_database": self.init_database,
692 685 "kill_server": self.kill_server,
693 686 "loaddata": self.loaddata,
... ... @@ -711,6 +704,7 @@ class Pyros(AManager):
711 704 "mysql_off": "switch the database to be used usage to SQLITE",
712 705 "makemigrations": "create new migrations",
713 706 "reset_config": "Reset the configuration in settings.py",
  707 + "reset_database_sim": "Reset the database content",
714 708 "help": "Help message",
715 709 "updatedb": "Update the database",
716 710 "kill_server": "Kill the web server on port 8000",
... ...
simulators/config/conf.json
... ... @@ -41,7 +41,12 @@
41 41 "userSimulator" : "routine_request_10.xml"
42 42 },
43 43 {
44   - "time" : 2,
  44 + "time" : 80,
45 45 "plcSimulator" : {"WeatherStationRainSensor" : 40}
  46 + },
  47 + {
  48 + "time" : 90,
  49 + "plcSimulator" : {"WeatherStationRainSensor": 0}
46 50 }
  51 +
47 52 ]
... ...
src/alert_manager/tasks.py
... ... @@ -15,6 +15,7 @@ log = L.setupLogger("AlertListenerLogger", "AlertListener")
15 15  
16 16 TIMESTAMP_JD = 2440587.500000
17 17 VOEVENTS_PATH = "alert_manager/events_received"
  18 +DEBUG_FILE = False
18 19  
19 20 '''
20 21 Launched at server start
... ... @@ -25,12 +26,33 @@ VOEVENTS_PATH = "alert_manager/events_received"
25 26 class AlertListener(Task):
26 27 old_files = []
27 28  
  29 + #ย TODO check monitoring and majordome status ?
  30 + # def createTask(self):
  31 + # try:
  32 + # TaskId.objects.find(task="alert_manager").delete()
  33 + # except Exception as e:
  34 + # self.log(str(e))
  35 + # return 1
  36 + # TaskId.objects.create(task_id=self.request.id, task="alert_manager")
  37 + # return 0
  38 + #
  39 + # def setTasks(self):
  40 + # try:
  41 + # self.monitoring_task = TaskId.objects.get(task="monitoring")
  42 + # self.majordome_task = TaskId.objects.get(task="majordome")
  43 + # except Exception as e:
  44 + # self.monitoring_task = None
  45 + # self.alert_task = None
  46 + # return 0
  47 +
28 48 def run(self):
  49 + # self.createTask()
29 50 self.old_files = [f for f in os.listdir(VOEVENTS_PATH) if isfile(join(VOEVENTS_PATH, f))]
30 51 Log.objects.create(agent="Alert manager", message="Start alert manager")
  52 + # self.setTasks()
31 53  
32 54 while True:
33   - if (settings.DEBUG):
  55 + if (settings.DEBUG and DEBUG_FILE):
34 56 log.info("Checking fresh events")
35 57 fresh_events = self.get_fresh_events()
36 58 for event in fresh_events:
... ...
src/devices/CameraNIR.py
... ... @@ -29,4 +29,8 @@ class NIRCameraController(DeviceController):
29 29 return "OK"
30 30  
31 31 def park(self):
32   - return 0
33 32 \ No newline at end of file
  33 + return 0
  34 +
  35 + def open_shutter(self):
  36 + self.do("OPEN SHUTTER")
  37 + return 0
... ...
src/devices/CameraVIS.py
... ... @@ -29,4 +29,8 @@ class VISCameraController(DeviceController):
29 29 return "OK"
30 30  
31 31 def park(self):
32   - return 0
33 32 \ No newline at end of file
  33 + return 0
  34 +
  35 + def open_shutter(self):
  36 + self.do("OPEN SHUTTER")
  37 + return 0
... ...
src/majordome/tasks.py
... ... @@ -9,6 +9,8 @@ import observation_manager.tasks
9 9 import scheduler
10 10 import scheduler.tasks as sched_task
11 11 import utils.Logger as L
  12 +import monitoring.tasks
  13 +import alert_manager.tasks
12 14 from common.models import *
13 15 from devices.CameraNIR import NIRCameraController
14 16 from devices.CameraVIS import VISCameraController
... ... @@ -64,6 +66,24 @@ class Majordome(Task):
64 66 self.dom = DomeController()
65 67 return (0)
66 68  
  69 + def createTask(self):
  70 + try:
  71 + TaskId.objects.find(task="majordome").delete()
  72 + except Exception as e:
  73 + log.info(str(e))
  74 + return 1
  75 + TaskId.objects.create(task_id=self.request.id, task="majordome")
  76 + return 0
  77 +
  78 + def setTasks(self):
  79 + try:
  80 + self.monitoring_task = TaskId.objects.get(task="monitoring")
  81 + self.alert_task = TaskId.objects.get(task="alert_manager")
  82 + except Exception as e:
  83 + self.monitoring_task = None
  84 + self.alert_task = None
  85 + return 0
  86 +
67 87 '''
68 88 Function called by celery task
69 89 Behavior:
... ... @@ -73,9 +93,11 @@ class Majordome(Task):
73 93 launch the majordome loop
74 94 '''
75 95 def run(self):
  96 + self.createTask()
76 97 self.updateSoftware()
77 98 self.setContext()
78 99 self.setTime()
  100 + self.setTasks()
79 101 self.loop()
80 102  
81 103 '''
... ... @@ -113,6 +135,7 @@ class Majordome(Task):
113 135 self.timer_night_start = self.night_start - getCurrentTime()
114 136 self.timer_night_end = self.night_end - getCurrentTime()
115 137 self.timer_status = 5
  138 + self.tasks_timer = 5
116 139 self.timer_plc = 2
117 140 self.timer_schedule = 1
118 141 self.timer_sequence = 1
... ... @@ -129,7 +152,8 @@ class Majordome(Task):
129 152 "night_start": self.timer_night_start,
130 153 "night_end": self.timer_night_end,
131 154 "schedule": self.timer_schedule,
132   - "sequence": self.timer_sequence
  155 + "sequence": self.timer_sequence,
  156 + "tasks": self.tasks_timer
133 157 }
134 158 if (settings.DEBUG and DEBUG_FILE):
135 159 log.info("Majordome started with timers : " + str(self.timers))
... ... @@ -140,11 +164,30 @@ class Majordome(Task):
140 164 "night_start": self.handleNightStartTimer,
141 165 "night_end": self.handleNightEndTimer,
142 166 "schedule": self.handleScheduleTimer,
143   - "sequence": self.handleSequenceTimer
  167 + "sequence": self.handleSequenceTimer,
  168 + "tasks": self.handleTasks
144 169 }
145 170 return (0)
146 171  
147   - # TODO adapt timers if the majordome is started during the night
  172 + def handleTasks(self):
  173 + self.timers["tasks"] = self.tasks_timer
  174 + if self.monitoring_task is None:
  175 + try:
  176 + self.monitoring_task = TaskId.objects.get(task="monitoring")
  177 + except Exception as e:
  178 + monitoring.tasks.Monitoring.apply_async()
  179 + if settings.DEBUG and DEBUG_FILE:
  180 + log.info(str(e))
  181 + if self.alert_task is None:
  182 + try:
  183 + self.alert_task = TaskId.objects.get(task="alert_manager")
  184 + except Exception as e:
  185 + alert_manager.tasks.AlertListener.apply_async()
  186 + if settings.DEBUG and DEBUG_FILE:
  187 + log.info(str(e))
  188 + return 0
  189 +
  190 + # TODO adapt timers if the majordome is started during the night or not ?
148 191 def adaptTimers(self):
149 192 pass
150 193  
... ... @@ -185,7 +228,7 @@ class Majordome(Task):
185 228 self.status_vis = self.vis_camera.getStatus()
186 229 self.status_dom = self.dom.getStatus()
187 230 self.handleStatus()
188   - return (0)
  231 + return 0
189 232  
190 233 def handleSequenceTimer(self):
191 234 self.timers["sequence"] = self.timer_sequence
... ... @@ -225,18 +268,18 @@ class Majordome(Task):
225 268 def handleNightEndTimer(self):
226 269 self.timers["night_end"] = getNightEnd()
227 270 if (self.isValidStatus(self.status_tel)):
228   - observation_manager.tasks.create_calibrations.delay()
  271 + observation_manager.tasks.night_calibrations.apply_async()
229 272 else:
230 273 self.notifyTelescopeStatus("night_end")
231 274 return (0)
232 275  
233 276 def handleNightStartTimer(self):
234 277 self.timers["night_start"] = getNextNightStart()
  278 + if self.isOutsideOk():
  279 + self.dom.open()
  280 + self.vis_camera.open_shutter()
  281 + self.nir_camera.open_shutter()
235 282 scheduler.tasks.scheduling.apply_async((False, False))
236   - # if (self.isValidStatus(self.status_tel)):
237   - # scheduler.tasks.scheduling.delay(first_schedule=False, alert=False)
238   - # else:
239   - # self.notifyTelescopeStatus("night_start")
240 283 return (0)
241 284  
242 285 def notifyTelescopeStatus(self, timer_name):
... ... @@ -252,8 +295,7 @@ class Majordome(Task):
252 295 Function called when a schedule has to be executed
253 296 '''
254 297 def executeSchedule(self, shs_list):
255   - self.logDB("Trying to execute a sequence from current schedule")
256   - for shs in shs_list: # shs_list is sorted by tsp
  298 + for shs in shs_list: # shs_list is sorted by tsp
257 299 if (self.executableSequence(shs.sequence.status) and self.observable(shs.sequence)):
258 300 if self.next_sequence is None:
259 301 self.setNextSequence(shs, shs.sequence)
... ... @@ -302,10 +344,9 @@ class Majordome(Task):
302 344 def reset(self, type):
303 345 if type == "WEATHER":
304 346 self.dom.open()
305   - scheduler.tasks.delay((False, False))
  347 + scheduler.tasks.scheduling.delay((False, False))
306 348 elif type == "INSIDE":
307   - scheduler.tasks.delay((False, False))
308   -
  349 + scheduler.tasks.scheduling.delay((False, False))
309 350  
310 351 @SameAlarmCheck
311 352 def handleAlarm(self, type, pos=-1):
... ... @@ -489,7 +530,7 @@ class Majordome(Task):
489 530 def systemPause(self, duration, cause: str):
490 531 self.logDB("System in pause for " + str(duration))
491 532 time.sleep(duration)
492   - scheduler.tasks.scheduling.delay(first_schedule=False, alert=False)
  533 + scheduler.tasks.scheduling.apply_async(first_schedule=False, alert=False)
493 534 self.setTime()
494 535 print("system has been paused. Cause : " + cause)
495 536 return (0)
... ...
src/monitoring/tasks.py
... ... @@ -4,8 +4,10 @@ from common.models import *
4 4 from celery.task import Task
5 5 from devices.PLC import PLCController
6 6 from utils.JDManipulator import *
7   -import json
8 7 import utils.Logger as L
  8 +import majordome.tasks
  9 +import alert_manager.tasks
  10 +
9 11 log = L.setupLogger("MonitoringTaskLogger", "Monitoring")
10 12  
11 13 DEBUG_FILE = False
... ... @@ -20,10 +22,30 @@ class Monitoring(Task):
20 22 functions = {}
21 23  
22 24 def run(self):
  25 + self.createTask()
23 26 self.setContext()
24 27 self.setTime()
  28 + self.setTasks()
25 29 self.loop()
26 30  
  31 + def createTask(self):
  32 + try:
  33 + TaskId.objects.find(task="monitoring").delete()
  34 + except Exception as e:
  35 + log.info(str(e))
  36 + return 1
  37 + TaskId.objects.create(task_id=self.request.id, task="monitoring")
  38 + return 0
  39 +
  40 + def setTasks(self):
  41 + try:
  42 + self.majordome_task = TaskId.objects.get(task="majordome")
  43 + self.alert_task = TaskId.objects.get(task="alert_manager")
  44 + except Exception as e:
  45 + self.majordome_task = None
  46 + self.alert_task = None
  47 + return 0
  48 +
27 49 def setContext(self):
28 50 self.plc = PLCController()
29 51 self.state = "RUNNING"
... ... @@ -31,13 +53,35 @@ class Monitoring(Task):
31 53  
32 54 def setTime(self):
33 55 self.timer_status = 2
34   - self.timers = {"timer_status": self.timer_status}
35   - self.functions = {"timer_status": self.handleTimerStatus}
  56 + self.timer_tasks = 5
  57 + self.timers = {"timer_status": self.timer_status,
  58 + "tasks": self.timer_tasks}
  59 + self.functions = {"timer_status": self.handleTimerStatus,
  60 + "tasks": self.handleTasks}
36 61 return (0)
37 62  
38 63 def logDB(self, message: str):
39 64 Log.objects.create(agent='Monitoring', message=message)
40 65  
  66 + def handleTasks(self):
  67 + self.timers["tasks"] = self.timer_tasks
  68 + # TODO check majordome and alert_manager status
  69 + if self.majordome_task is None:
  70 + try:
  71 + self.monitoring_task = TaskId.objects.get(task="majordome")
  72 + except Exception as e:
  73 + majordome.tasks.Majordome.apply_async()
  74 + if settings.DEBUG and DEBUG_FILE:
  75 + log.info(str(e))
  76 + if self.alert_task is None:
  77 + try:
  78 + self.alert_task = TaskId.objects.get(task="alert_manager")
  79 + except Exception as e:
  80 + alert_manager.tasks.AlertListener.apply_async()
  81 + if settings.DEBUG and DEBUG_FILE:
  82 + log.info(str(e))
  83 + return 0
  84 +
41 85 def parseStatus(self, status_plc):
42 86 try:
43 87 status = {}
... ...
src/observation_manager/tasks.py
... ... @@ -207,3 +207,7 @@ class create_calibrations(Task):
207 207 return 1
208 208 self.execute()
209 209 return self.end()
  210 +
  211 +class night_calibrations(Task):
  212 + def run(self):
  213 + return 0
210 214 \ No newline at end of file
... ...
src/pyros/settings.py
... ... @@ -142,11 +142,10 @@ if not CELERY_TEST:
142 142 else:
143 143 DATABASES = {
144 144 'default': {
145   - 'ENGINE': 'django.db.backends.sqlite3',
146   - 'NAME': os.path.join(BASE_DIR, 'testdb.sqlite3'),
147   - 'TEST': {
148   - 'NAME': os.path.join(BASE_DIR, 'testdb.sqlite3'),
149   - },
  145 + 'ENGINE': 'django.db.backends.mysql',
  146 + 'NAME': 'pyros_test',
  147 + 'USER': 'pyros',
  148 + 'PASSWORD': 'DjangoPyros'
150 149 }
151 150 }
152 151  
... ... @@ -263,6 +262,7 @@ CELERY_QUEUES = {
263 262 "create_calibrations_q": {"exchange": "create_calibrations_q", "routing_key": "create_calibrations_q"},
264 263 "execute_plan_vis_q": {"exchange": "execute_plan_vis_q", "routing_key": "execute_plan_vis_q"},
265 264 "execute_plan_nir_q": {"exchange": "execute_plan_nir_q", "routing_key": "execute_plan_nir_q"},
  265 + "night_calibrations_q": {"exchange": "night_calibrations_q", "routing_key": "night_calibrations_q"},
266 266 }
267 267  
268 268 CELERY_ROUTES = {
... ... @@ -273,6 +273,7 @@ CELERY_ROUTES = {
273 273 "observation_manager.tasks.execute_plan_vis": {"queue": "execute_plan_vis_q"},
274 274 "observation_manager.tasks.execute_plan_nir": {"queue": "execute_plan_nir_q"},
275 275 "observation_manager.tasks.create_calibrations": {"queue": "create_calibrations_q"},
  276 + "observation_manager.tasks.night_calibrations": {"queue": "night_calibrations_q"},
276 277 "scheduler.tasks.scheduling": {"queue": "scheduling_q"}
277 278 }
278 279 # "userSimulator.tasks.simulator": {"queue": "simulator_q"},
... ...
src/pyros/settings.py.bak
... ... @@ -142,11 +142,10 @@ if not CELERY_TEST:
142 142 else:
143 143 DATABASES = {
144 144 'default': {
145   - 'ENGINE': 'django.db.backends.sqlite3',
146   - 'NAME': os.path.join(BASE_DIR, 'testdb.sqlite3'),
147   - 'TEST': {
148   - 'NAME': os.path.join(BASE_DIR, 'testdb.sqlite3'),
149   - },
  145 + 'ENGINE': 'django.db.backends.mysql',
  146 + 'NAME': 'pyros_test',
  147 + 'USER': 'pyros',
  148 + 'PASSWORD': 'DjangoPyros'
150 149 }
151 150 }
152 151  
... ... @@ -263,6 +262,7 @@ CELERY_QUEUES = {
263 262 "create_calibrations_q": {"exchange": "create_calibrations_q", "routing_key": "create_calibrations_q"},
264 263 "execute_plan_vis_q": {"exchange": "execute_plan_vis_q", "routing_key": "execute_plan_vis_q"},
265 264 "execute_plan_nir_q": {"exchange": "execute_plan_nir_q", "routing_key": "execute_plan_nir_q"},
  265 + "night_calibrations_q": {"exchange": "night_calibrations_q", "routing_key": "night_calibrations_q"},
266 266 }
267 267  
268 268 CELERY_ROUTES = {
... ... @@ -273,6 +273,7 @@ CELERY_ROUTES = {
273 273 "observation_manager.tasks.execute_plan_vis": {"queue": "execute_plan_vis_q"},
274 274 "observation_manager.tasks.execute_plan_nir": {"queue": "execute_plan_nir_q"},
275 275 "observation_manager.tasks.create_calibrations": {"queue": "create_calibrations_q"},
  276 + "observation_manager.tasks.night_calibrations": {"queue": "night_calibrations_q"},
276 277 "scheduler.tasks.scheduling": {"queue": "scheduling_q"}
277 278 }
278 279 # "userSimulator.tasks.simulator": {"queue": "simulator_q"},
... ...