Skip to content

Commit 3ff1f7e

Browse files
Merge branch 'main' into feature/TED-392
2 parents 4efdc2a + 8a3dcea commit 3ff1f7e

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/unit-tests-hermes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
- name: Get Saxon
2828
run: make init-saxon
2929

30-
- name: Start staging infra
31-
run: make start-project-services
30+
# - name: Start staging infra
31+
# run: make start-project-services
3232

3333
- name: Run unit tests
3434
run: make test-all

dags/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email_on_retry": False,
1010
"retries": 0,
1111
"retry_delay": timedelta(minutes=3600),
12-
"max_active_runs": 128,
13-
"concurrency": 128,
12+
"max_active_runs": 15,
13+
"concurrency": 15,
1414
"execution_timeout": timedelta(days=10),
1515
}

dags/fetch_notices_per_day_worker.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import datetime
2+
import time
3+
from random import randint
24

35
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
46

@@ -38,16 +40,18 @@ def fetch_notices_and_trigger_index_and_normalise_notice_worker():
3840
while restart_dag_operator:
3941
restart_dag_operator = False
4042
try:
43+
time.sleep(randint(10, 500) / 1000)
4144
TriggerDagRunOperator(
4245
task_id=f'trigger_index_and_normalise_notice_worker_dag_{notice_id}',
4346
trigger_dag_id="index_and_normalise_notice_worker",
4447
trigger_run_id=notice_id,
45-
execution_date=datetime.datetime.now().replace(tzinfo=datetime.timezone.utc),
4648
conf={NOTICE_ID: notice_id}
4749
).execute(context=context)
48-
except:
50+
except Exception as e:
51+
4952
restart_dag_operator = True
5053
print("trigger dag operator restarted !!!")
54+
print("EXCEPTION message: ", e)
5155

5256
fetch_notices_and_trigger_index_and_normalise_notice_worker()
5357

0 commit comments

Comments
 (0)