Skip to content

Commit 9ee319e

Browse files
Merge pull request #164 from neutrons/update_default_catalog
Change default CATALOG_DATA_READY to OnCat
2 parents 947c0ed + a1a0584 commit 9ee319e

File tree

9 files changed

+52
-79
lines changed

9 files changed

+52
-79
lines changed

Dockerfile.catalog

Lines changed: 0 additions & 9 deletions
This file was deleted.

docker-compose.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,6 @@ services:
158158
webmon:
159159
condition: service_healthy
160160

161-
catalog_process:
162-
restart: always
163-
build:
164-
context: .
165-
dockerfile: Dockerfile.catalog
166-
network: host
167-
environment:
168-
ICAT_USER: "icat"
169-
ICAT_PASSCODE: "icat"
170-
ACTIVE_MQ_PORTS: 61613
171-
depends_on:
172-
activemq:
173-
condition: service_healthy
174-
175161
autoheal:
176162
restart: always
177163
image: willfarrell/autoheal

src/catalog/catalog_process.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/webmon_app/reporting/fixtures/db_init.json

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,38 @@
197197
"is_workflow_input": true
198198
}
199199
},
200+
{
201+
"model": "report.statusqueue",
202+
"pk": 24,
203+
"fields": {
204+
"name": "CATALOG.ONCAT.DATA_READY",
205+
"is_workflow_input": false
206+
}
207+
},
208+
{
209+
"model": "report.statusqueue",
210+
"pk": 25,
211+
"fields": {
212+
"name": "CATALOG.ONCAT.STARTED",
213+
"is_workflow_input": true
214+
}
215+
},
216+
{
217+
"model": "report.statusqueue",
218+
"pk": 26,
219+
"fields": {
220+
"name": "CATALOG.ONCAT.ERROR",
221+
"is_workflow_input": true
222+
}
223+
},
224+
{
225+
"model": "report.statusqueue",
226+
"pk": 27,
227+
"fields": {
228+
"name": "CATALOG.ONCAT.COMPLETE",
229+
"is_workflow_input": true
230+
}
231+
},
200232
{
201233
"model": "report.task",
202234
"pk": 1,
@@ -216,11 +248,11 @@
216248
"input_queue_id": 1,
217249
"task_class": " ",
218250
"task_queue_ids": [
219-
4,
251+
24,
220252
7
221253
],
222254
"success_queue_ids": [
223-
6,
255+
27,
224256
11
225257
]
226258
}

src/workflow_app/workflow/database/report/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ def update(self):
378378
self.complete = False
379379

380380
# Look for cataloging status
381-
if len(RunStatus.objects.status(self.run_id, "CATALOG.COMPLETE")) > 0:
381+
if len(RunStatus.objects.status(self.run_id, "CATALOG.ONCAT.COMPLETE")) > 0:
382382
self.cataloged = True
383-
if len(RunStatus.objects.status(self.run_id, "CATALOG.STARTED")) > 0:
383+
if len(RunStatus.objects.status(self.run_id, "CATALOG.ONCAT.STARTED")) > 0:
384384
self.catalog_started = True
385385

386386
# Check whether we need reduction (default is no)

src/workflow_app/workflow/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Default queue names
1212
POSTPROCESS_INFO = "POSTPROCESS.INFO"
1313
POSTPROCESS_ERROR = "POSTPROCESS.ERROR"
14-
CATALOG_DATA_READY = "CATALOG.DATA_READY"
14+
CATALOG_DATA_READY = "CATALOG.ONCAT.DATA_READY"
1515
REDUCTION_DATA_READY = "REDUCTION.DATA_READY"
1616
REDUCTION_CATALOG_DATA_READY = "REDUCTION_CATALOG.DATA_READY"
1717

src/workflow_app/workflow/tests/database_models_test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def test_update_catalog(self, runStatusObjectsMock, djangoModelsMock):
112112

113113
def status_lookup(run_id, param_string):
114114
vals = {
115-
"CATALOG.COMPLETE": 1,
116-
"CATALOG.STARTED": 0,
115+
"CATALOG.ONCAT.COMPLETE": 1,
116+
"CATALOG.ONCAT.STARTED": 0,
117117
"REDUCTION.NOT_NEEDED": 0,
118118
"REDUCTION.DISABLED": 0,
119119
"REDUCTION.COMPLETE": 0,
@@ -141,8 +141,8 @@ def test_update_reduction_need(self, runStatusObjectsMock, djangoModelsMock):
141141

142142
def status_lookup(run_id, param_string):
143143
vals = {
144-
"CATALOG.COMPLETE": 0,
145-
"CATALOG.STARTED": 0,
144+
"CATALOG.ONCAT.COMPLETE": 0,
145+
"CATALOG.ONCAT.STARTED": 0,
146146
"REDUCTION.NOT_NEEDED": 1,
147147
"REDUCTION.DISABLED": 1,
148148
"REDUCTION.COMPLETE": 0,
@@ -169,8 +169,8 @@ def test_update_reduction_status(self, runStatusObjectsMock, djangoModelsMock):
169169

170170
def status_lookup(run_id, param_string):
171171
vals = {
172-
"CATALOG.COMPLETE": 0,
173-
"CATALOG.STARTED": 0,
172+
"CATALOG.ONCAT.COMPLETE": 0,
173+
"CATALOG.ONCAT.STARTED": 0,
174174
"REDUCTION.NOT_NEEDED": 0,
175175
"REDUCTION.DISABLED": 0,
176176
"REDUCTION.COMPLETE": 1,
@@ -198,8 +198,8 @@ def test_update_reduction_catalog(self, runStatusObjectsMock, djangoModelsMock):
198198

199199
def status_lookup(run_id, param_string):
200200
vals = {
201-
"CATALOG.COMPLETE": 0,
202-
"CATALOG.STARTED": 0,
201+
"CATALOG.ONCAT.COMPLETE": 0,
202+
"CATALOG.ONCAT.STARTED": 0,
203203
"REDUCTION.NOT_NEEDED": 0,
204204
"REDUCTION.DISABLED": 0,
205205
"REDUCTION.COMPLETE": 0,
@@ -227,8 +227,8 @@ def test_update_overall(self, runStatusObjectsMock, djangoModelsMock):
227227

228228
def status_lookup(run_id, param_string):
229229
vals = {
230-
"CATALOG.COMPLETE": 1,
231-
"CATALOG.STARTED": 0,
230+
"CATALOG.ONCAT.COMPLETE": 1,
231+
"CATALOG.ONCAT.STARTED": 0,
232232
"REDUCTION.NOT_NEEDED": 1,
233233
"REDUCTION.DISABLED": 0,
234234
"REDUCTION.COMPLETE": 0,

tests/test_PostProcessWorkflow.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import psycopg2
22
import requests
33
import time
4-
import pytest
54
from django.conf import settings
65
from dotenv import dotenv_values
76

@@ -74,17 +73,16 @@ def get_status_errors(self, cursor, datarun_id):
7473
errors.append(result)
7574
return errors
7675

77-
@pytest.mark.skip("Skipping due to catalog start message not sending in CI")
7876
def test_catalog(self):
7977
cursor = self.__class__.conn.cursor()
8078

8179
datarun_id = self.get_datarun_id(cursor, "arcs", "IPTS-27800", "214583")
8280

8381
queue_id = self.get_queue_id(cursor, "CATALOG.REQUEST")
84-
started_id = self.get_queue_id(cursor, "CATALOG.STARTED")
85-
ready_id = self.get_queue_id(cursor, "CATALOG.DATA_READY")
86-
complete_id = self.get_queue_id(cursor, "CATALOG.COMPLETE")
87-
error_id = self.get_queue_id(cursor, "CATALOG.ERROR")
82+
started_id = self.get_queue_id(cursor, "CATALOG.ONCAT.STARTED")
83+
ready_id = self.get_queue_id(cursor, "CATALOG.ONCAT.DATA_READY")
84+
complete_id = self.get_queue_id(cursor, "CATALOG.ONCAT.COMPLETE")
85+
error_id = self.get_queue_id(cursor, "CATALOG.ONCAT.ERROR")
8886

8987
# get current catalog status counts
9088
queues = [queue_id, started_id, ready_id, complete_id]

tests/test_SubmitPostprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def testPostProcessingSubmitMissingRunfile(self):
123123
self.send_request("POSTPROCESS.DATA_READY", RUN_NUMBER_MISSING, requestType="submit")
124124

125125
new_status_count = self.get_status_count(RUN_NUMBER_MISSING)
126-
assert new_status_count - status_count == 6
126+
assert new_status_count - status_count == 5
127127

128128
@pytest.mark.parametrize("run_number", [RUN_NUMBER_GOOD, RUN_NUMBER_MISSING])
129129
def testPostProcessingFind(self, run_number):

0 commit comments

Comments
 (0)