diff --git a/.env b/.env index fca892d4..b7e918ac 100644 --- a/.env +++ b/.env @@ -7,7 +7,7 @@ COMPOSE_PROJECT_NAME=helfi-kymp PROJECT_NAME=liikenne # Default Docker compose profiles -COMPOSE_PROFILES=search,queue +COMPOSE_PROFILES=search # OpenShift project name OC_PROJECT_NAME=hki-kanslia-liikenne-test diff --git a/compose.yaml b/compose.yaml index c680d449..8e5cc53e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -151,13 +151,12 @@ services: - search artemis: container_name: "${COMPOSE_PROJECT_NAME}-artemis" - image: quay.io/artemiscloud/activemq-artemis-broker - environment: - AMQ_EXTRA_ARGS: "--user admin --password admin" + image: apache/activemq-artemis depends_on: - app networks: - internal + - stonehenge-network profiles: - queue chromium: diff --git a/composer.lock b/composer.lock index 39d61128..c9a8c2f7 100644 --- a/composer.lock +++ b/composer.lock @@ -2259,16 +2259,16 @@ }, { "name": "drupal/core", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd" + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/42a6516491b4793158542a2326dc6ad1fe2aa5bd", - "reference": "42a6516491b4793158542a2326dc6ad1fe2aa5bd", + "url": "https://api.github.com/repos/drupal/core/zipball/3ebb71e9c4ef0c13f683353547551fca49f9a144", + "reference": "3ebb71e9c4ef0c13f683353547551fca49f9a144", "shasum": "" }, "require": { @@ -2417,13 +2417,13 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/10.3.9" + "source": "https://github.com/drupal/core/tree/10.3.10" }, - "time": "2024-11-20T17:59:45+00:00" + "time": "2024-11-22T12:51:33+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "10.3.9", + "version": "10.3.10", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", @@ -2467,7 +2467,7 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.9" + "source": "https://github.com/drupal/core-composer-scaffold/tree/10.3.10" }, "time": "2024-08-22T14:31:34+00:00" }, @@ -4302,17 +4302,20 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "53ad81c4249c6dd38deea3f6014ad0b1be47f2db" + "reference": "3de6f884ac7de9a43fe242f371dcf9416cac47b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/53ad81c4249c6dd38deea3f6014ad0b1be47f2db", - "reference": "53ad81c4249c6dd38deea3f6014ad0b1be47f2db", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/3de6f884ac7de9a43fe242f371dcf9416cac47b2", + "reference": "3de6f884ac7de9a43fe242f371dcf9416cac47b2", "shasum": "" }, "require": { "drupal/helfi_api_base": "*", - "drush/drush": "^11 || ^12 || ^13" + "drush/drush": "^12 || ^13" + }, + "conflict": { + "drush/drush": "< 12.5" }, "require-dev": { "composer/installers": "^2", @@ -4379,7 +4382,7 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2024-10-23T10:28:01+00:00" + "time": "2024-11-26T06:52:09+00:00" }, { "name": "drupal/helfi_navigation", @@ -4417,16 +4420,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "4.8.0", + "version": "4.8.1", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "d93cdc55e761665a2bb68503f466ab376a745c10" + "reference": "6c57a1041a22c37008822ea642ce63c763081369" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/d93cdc55e761665a2bb68503f466ab376a745c10", - "reference": "d93cdc55e761665a2bb68503f466ab376a745c10", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/6c57a1041a22c37008822ea642ce63c763081369", + "reference": "6c57a1041a22c37008822ea642ce63c763081369", "shasum": "" }, "require": { @@ -4495,7 +4498,7 @@ "ruflin/elastica": "^8.0" }, "conflict": { - "drupal/core": "<10.3", + "drupal/core": "<10.3.10", "drupal/core-composer-scaffold": "<10.3", "drupal/ctools": "<3.11 || ^4.0.1", "drupal/default_content": ">2.0.0-alpha2", @@ -4523,8 +4526,7 @@ "[#UHF-9388] Process configuration translation files for custom modules (https://www.drupal.org/i/2845437)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/fd68277191b8f8ec290e53b5fbbae699b2260384/patches/drupal-2845437-process-custom-module-translation-config-10.3.x.patch", "[#UHF-9690] Allow updating lists when switching from allowed values to allowed values function (https://www.drupal.org/i/2873353)": "https://www.drupal.org/files/issues/2021-05-18/allow-allowed-values-function-update-D9-2873353_1.patch", "[#UHF-9952, #UHF-9980] Duplicate
tags (https://www.drupal.org/i/3083786)": "https://www.drupal.org/files/issues/2024-08-08/3083786--mr-8066--10-3-backport.patch", - "[#UHF-10716] Ensure consistent ordering when calculating library asset order (https://www.drupal.org/i/3467860)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/955e2fc9493c6574ab070187b8a5a8634da7daab/patches/drupal-3467860-optimized-js-assets-mismatch.patch", - "[#UHF-10967] Performance Degraded after update to twig 3.14.2 (https://www.drupal.org/project/drupal/issues/3487031)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/90b44ce5a778d05bbe89f7eaca6412b7bd34efa0/patches/10177.patch" + "[#UHF-10716] Ensure consistent ordering when calculating library asset order (https://www.drupal.org/i/3467860)": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/955e2fc9493c6574ab070187b8a5a8634da7daab/patches/drupal-3467860-optimized-js-assets-mismatch.patch" }, "drupal/default_content": { "https://www.drupal.org/project/default_content/issues/2640734#comment-14638943": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/main/patches/default_content_2.0.0-alpha2-2640734_manual_imports-e164a354.patch" @@ -4553,10 +4555,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.8.0", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.8.1", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2024-11-20T11:35:52+00:00" + "time": "2024-11-25T13:05:33+00:00" }, { "name": "drupal/helfi_proxy", @@ -6413,20 +6415,20 @@ }, { "name": "drupal/search_api", - "version": "1.35.0", + "version": "1.36.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/search_api.git", - "reference": "8.x-1.35" + "reference": "8.x-1.36" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.35.zip", - "reference": "8.x-1.35", - "shasum": "d119726e870f793c6470d2a4fa9286662c5eb45d" + "url": "https://ftp.drupal.org/files/projects/search_api-8.x-1.36.zip", + "reference": "8.x-1.36", + "shasum": "1464f21cb924746a0df7f4cb080abaf00804e9a7" }, "require": { - "drupal/core": "^10.1 || ^11" + "drupal/core": "^10.2 || ^11" }, "conflict": { "drupal/search_api_solr": "2.* || 3.0 || 3.1" @@ -6444,17 +6446,12 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.35", - "datestamp": "1718551025", + "version": "8.x-1.36", + "datestamp": "1732448767", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" } - }, - "drush": { - "services": { - "drush.services.yml": "^9 || ^10 || ^11" - } } }, "notification-url": "https://packages.drupal.org/8/downloads", @@ -6539,36 +6536,37 @@ }, { "name": "drupal/simple_sitemap", - "version": "4.2.1", + "version": "4.2.2", "source": { "type": "git", "url": "https://git.drupalcode.org/project/simple_sitemap.git", - "reference": "4.2.1" + "reference": "4.2.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.2.1.zip", - "reference": "4.2.1", - "shasum": "d96b481571ca2fecdb305e87d2557f9338116864" + "url": "https://ftp.drupal.org/files/projects/simple_sitemap-4.2.2.zip", + "reference": "4.2.2", + "shasum": "1f9c9197d37450fb347a4fa3f10191f5f4b5ef13" }, "require": { "drupal/core": "^10.2 || ^11", "ext-xmlwriter": "*" }, + "conflict": { + "drush/drush": "<12.5.1" + }, + "require-dev": { + "drupal/paragraphs": "^1.18" + }, "type": "drupal-module", "extra": { "drupal": { - "version": "4.2.1", - "datestamp": "1723802052", + "version": "4.2.2", + "datestamp": "1732485885", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" } - }, - "drush": { - "services": { - "drush.services.yml": ">=9" - } } }, "notification-url": "https://packages.drupal.org/8/downloads", @@ -8120,16 +8118,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.1", + "version": "v6.10.2", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "500501c2ce893c824c801da135d02661199f60c5" + "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5", - "reference": "500501c2ce893c824c801da135d02661199f60c5", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b", + "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b", "shasum": "" }, "require": { @@ -8177,9 +8175,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.1" + "source": "https://github.com/firebase/php-jwt/tree/v6.10.2" }, - "time": "2024-05-18T18:05:11+00:00" + "time": "2024-11-24T11:22:49+00:00" }, { "name": "galbar/jsonpath", @@ -8234,16 +8232,16 @@ }, { "name": "grasmash/expander", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/grasmash/expander.git", - "reference": "bb1c1a2430957945cf08c5a62f5d72a6aa6a2c82" + "reference": "eea11b9afb0c32483b18b9009f4ca07b770e39f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/grasmash/expander/zipball/bb1c1a2430957945cf08c5a62f5d72a6aa6a2c82", - "reference": "bb1c1a2430957945cf08c5a62f5d72a6aa6a2c82", + "url": "https://api.github.com/repos/grasmash/expander/zipball/eea11b9afb0c32483b18b9009f4ca07b770e39f4", + "reference": "eea11b9afb0c32483b18b9009f4ca07b770e39f4", "shasum": "" }, "require": { @@ -8280,9 +8278,9 @@ "description": "Expands internal property references in PHP arrays file.", "support": { "issues": "https://github.com/grasmash/expander/issues", - "source": "https://github.com/grasmash/expander/tree/3.0.0" + "source": "https://github.com/grasmash/expander/tree/3.0.1" }, - "time": "2022-05-10T13:14:49+00:00" + "time": "2024-11-25T23:28:05+00:00" }, { "name": "grasmash/yaml-cli", @@ -10010,16 +10008,16 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.15", + "version": "v1.10.16", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c" + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/ce0adade8b97561656ace07cdaac4751c271ea8c", - "reference": "ce0adade8b97561656ace07cdaac4751c271ea8c", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/c0f51b45f50683bf5bbf558036854ebc9b54d033", + "reference": "c0f51b45f50683bf5bbf558036854ebc9b54d033", "shasum": "" }, "require": { @@ -10055,7 +10053,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2024-03-16T18:41:45+00:00" + "time": "2024-11-24T22:27:58+00:00" }, { "name": "pear/pear_exception", diff --git a/conf/cmi/core.entity_form_display.node.landing_page.default.yml b/conf/cmi/core.entity_form_display.node.landing_page.default.yml index 4a3fdc21..ee56116a 100644 --- a/conf/cmi/core.entity_form_display.node.landing_page.default.yml +++ b/conf/cmi/core.entity_form_display.node.landing_page.default.yml @@ -128,9 +128,9 @@ content: third_party_settings: { } simple_sitemap: weight: 10 + region: content settings: { } third_party_settings: { } - region: content status: type: boolean_checkbox weight: 12 diff --git a/conf/cmi/search_api.index.districts.yml b/conf/cmi/search_api.index.districts.yml index acaf5489..f85482ed 100644 --- a/conf/cmi/search_api.index.districts.yml +++ b/conf/cmi/search_api.index.districts.yml @@ -9,9 +9,9 @@ dependencies: - field.storage.node.field_subdistricts - search_api.server.elastic_kymp module: - - node + - helfi_react_search - media - - search_api + - node id: districts name: Districts description: '' diff --git a/conf/cmi/search_api.index.districts_for_filters.yml b/conf/cmi/search_api.index.districts_for_filters.yml index 3459c88f..46373707 100644 --- a/conf/cmi/search_api.index.districts_for_filters.yml +++ b/conf/cmi/search_api.index.districts_for_filters.yml @@ -5,8 +5,8 @@ dependencies: config: - search_api.server.elastic_kymp module: + - helfi_react_search - node - - search_api id: districts_for_filters name: 'Districts for filters' description: 'Districts to be used for search filters.' diff --git a/conf/cmi/search_api.index.project_phases.yml b/conf/cmi/search_api.index.project_phases.yml index 393a1ccd..69943d07 100644 --- a/conf/cmi/search_api.index.project_phases.yml +++ b/conf/cmi/search_api.index.project_phases.yml @@ -5,8 +5,8 @@ dependencies: config: - search_api.server.elastic_kymp module: + - helfi_react_search - taxonomy - - search_api id: project_phases name: 'Project phases' description: 'Project phases from taxonomy to be used for search filters.' diff --git a/conf/cmi/search_api.index.project_themes.yml b/conf/cmi/search_api.index.project_themes.yml index 82f6a5b2..f881db60 100644 --- a/conf/cmi/search_api.index.project_themes.yml +++ b/conf/cmi/search_api.index.project_themes.yml @@ -5,8 +5,8 @@ dependencies: config: - search_api.server.elastic_kymp module: + - helfi_react_search - taxonomy - - search_api id: project_themes name: 'Project themes' description: 'Project themes from taxonomy to be used for search filters.' diff --git a/conf/cmi/search_api.index.project_types.yml b/conf/cmi/search_api.index.project_types.yml index 8370c54f..6a06ccd7 100644 --- a/conf/cmi/search_api.index.project_types.yml +++ b/conf/cmi/search_api.index.project_types.yml @@ -5,8 +5,8 @@ dependencies: config: - search_api.server.elastic_kymp module: + - helfi_react_search - taxonomy - - search_api id: project_types name: 'Project types' description: 'Project types from taxonomy to be used for search filters.' diff --git a/conf/cmi/search_api.index.projects.yml b/conf/cmi/search_api.index.projects.yml index 10b3f4a5..09ed78a8 100644 --- a/conf/cmi/search_api.index.projects.yml +++ b/conf/cmi/search_api.index.projects.yml @@ -3,9 +3,9 @@ langcode: en status: true dependencies: config: + - field.storage.media.field_media_image - field.storage.node.field_project_district - field.storage.node.field_project_external_website - - field.storage.media.field_media_image - field.storage.node.field_project_image - field.storage.node.field_project_phase - field.storage.node.field_project_search_metatags @@ -13,10 +13,10 @@ dependencies: - field.storage.node.field_project_type - search_api.server.elastic_kymp module: - - node + - helfi_react_search - media + - node - taxonomy - - search_api id: projects name: Projects description: '' diff --git a/conf/cmi/search_api.index.street_data.yml b/conf/cmi/search_api.index.street_data.yml index e6d9d783..00f7a31e 100644 --- a/conf/cmi/search_api.index.street_data.yml +++ b/conf/cmi/search_api.index.street_data.yml @@ -5,9 +5,8 @@ dependencies: config: - search_api.server.elastic_kymp module: - - search_api - - helfi_react_search - helfi_kymp_content + - helfi_react_search id: street_data name: 'Street data' description: 'Street data for street maintenance class search.' diff --git a/conf/cmi/views.view.er_tpr_unit.yml b/conf/cmi/views.view.er_tpr_unit.yml index dd75506a..cbd32963 100644 --- a/conf/cmi/views.view.er_tpr_unit.yml +++ b/conf/cmi/views.view.er_tpr_unit.yml @@ -91,6 +91,7 @@ display: type: mini options: offset: 0 + pagination_heading_level: h4 items_per_page: 10 total_pages: null id: 0 @@ -105,7 +106,6 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset - pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.locked_services.yml b/conf/cmi/views.view.locked_services.yml index b90334a4..ee31d545 100644 --- a/conf/cmi/views.view.locked_services.yml +++ b/conf/cmi/views.view.locked_services.yml @@ -381,6 +381,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 @@ -398,7 +399,6 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.locked_units.yml b/conf/cmi/views.view.locked_units.yml index 4d89f6c2..8343d8e9 100644 --- a/conf/cmi/views.view.locked_units.yml +++ b/conf/cmi/views.view.locked_units.yml @@ -381,6 +381,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 @@ -398,7 +399,6 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.service_list.yml b/conf/cmi/views.view.service_list.yml index e2ccbdeb..7e190ab5 100644 --- a/conf/cmi/views.view.service_list.yml +++ b/conf/cmi/views.view.service_list.yml @@ -109,6 +109,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 4 total_pages: null id: 0 @@ -126,7 +127,6 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 exposed_form: type: basic options: @@ -646,6 +646,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 5 total_pages: null id: 0 @@ -663,7 +664,6 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.service_units.yml b/conf/cmi/views.view.service_units.yml index ce78017e..631f7dee 100644 --- a/conf/cmi/views.view.service_units.yml +++ b/conf/cmi/views.view.service_units.yml @@ -93,6 +93,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 8 total_pages: null id: 0 @@ -110,7 +111,6 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.unit_search.yml b/conf/cmi/views.view.unit_search.yml index 72a7edf1..101b4532 100644 --- a/conf/cmi/views.view.unit_search.yml +++ b/conf/cmi/views.view.unit_search.yml @@ -286,6 +286,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 15 total_pages: null id: 0 @@ -303,7 +304,6 @@ display: offset: false offset_label: Offset quantity: 9 - pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/docker/openshift/crons/menu-queue.sh b/docker/openshift/crons/menu-queue.sh new file mode 100644 index 00000000..c4cd99b0 --- /dev/null +++ b/docker/openshift/crons/menu-queue.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +source /init.sh + +if [ -z "$AMQ_BROKERS" ]; then + exit 0 +fi + +if ! is_drupal_module_enabled "helfi_navigation"; then + exit 0 +fi + +while true +do + # Restart process every 12 hours. + drush stomp:worker helfi_navigation_menu_queue --lease-time 43200 +done diff --git a/docker/openshift/crons/revision-queue.sh b/docker/openshift/crons/revision-queue.sh new file mode 100644 index 00000000..130ba3fe --- /dev/null +++ b/docker/openshift/crons/revision-queue.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -z "$AMQ_BROKERS" ]; then + exit 0 +fi + +while true +do + # Restart process every 12 hours. + drush stomp:worker helfi_api_base_revision --lease-time 43200 +done diff --git a/public/sites/default/settings.php b/public/sites/default/settings.php index 2f8d1e8e..b80276cd 100755 --- a/public/sites/default/settings.php +++ b/public/sites/default/settings.php @@ -260,24 +260,18 @@ function drupal_get_env(string|array $variables) : mixed { $config['helfi_proxy.settings']['session_suffix'] = $session_suffix; } -if ($robots_header_enabled = getenv('DRUPAL_X_ROBOTS_TAG_HEADER')) { - $config['helfi_proxy.settings']['robots_header_enabled'] = (bool) $robots_header_enabled; -} - -$artemis_destination = drupal_get_env([ - 'ARTEMIS_DESTINATION', +$amq_destination = drupal_get_env([ 'PROJECT_NAME', ]); +$amq_brokers = getenv('AMQ_BROKERS'); -$artemis_brokers = getenv('ARTEMIS_BROKERS'); - -if ($artemis_brokers && $artemis_destination) { +if ($amq_brokers && $amq_destination) { $settings['stomp']['default'] = [ - 'clientId' => getenv('ARTEMIS_CLIENT_ID') ?: 'artemis', - 'login' => getenv('ARTEMIS_LOGIN') ?: NULL, - 'passcode' => getenv('ARTEMIS_PASSCODE') ?: NULL, - 'destination' => sprintf('/queue/%s', $artemis_destination), - 'brokers' => $artemis_brokers, + 'clientId' => getenv('AMQ_CLIENT_ID') ?: 'client_ ' . $amq_destination, + 'login' => getenv('AMQ_USER') ?: NULL, + 'passcode' => getenv('AMQ_PASSWORD') ?: NULL, + 'destination' => sprintf('/queue/%s', $amq_destination), + 'brokers' => $amq_brokers, 'timeout' => ['read' => 12000], 'heartbeat' => [ 'send' => 20000, @@ -289,7 +283,17 @@ function drupal_get_env(string|array $variables) : mixed { ], ], ]; - $settings['queue_default'] = 'queue.stomp.default'; + + $queues = [ + 'helfi_navigation_menu_queue', + 'helfi_api_base_revision', + ]; + foreach ($queues as $queue) { + $settings['queue_service_' . $queue] = 'queue.stomp.default'; + } + // You must configure project specific queues manually in 'all.settings.php' + // file. + // @see https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/queue.md } $config['filelog.settings']['rotation']['schedule'] = 'never';