Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic update #487

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
COMPOSE_PROJECT_NAME=asuminen
PROJECT_NAME=asuminen

COMPOSE_PROFILES=queue
COMPOSE_PROFILES=

# OpenShift project name
OC_PROJECT_NAME=hki-kanslia-asuminen-test
Expand Down
5 changes: 2 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
154 changes: 77 additions & 77 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.er_tpr_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ display:
type: mini
options:
offset: 0
pagination_heading_level: h4
items_per_page: 10
total_pages: null
id: 0
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.locked_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 50
total_pages: null
id: 0
Expand All @@ -398,7 +399,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.locked_units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 50
total_pages: null
id: 0
Expand All @@ -398,7 +399,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
4 changes: 2 additions & 2 deletions conf/cmi/views.view.service_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 4
total_pages: null
id: 0
Expand All @@ -126,7 +127,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down Expand Up @@ -646,6 +646,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 5
total_pages: null
id: 0
Expand All @@ -663,7 +664,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.service_units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 8
total_pages: null
id: 0
Expand All @@ -110,7 +111,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.unit_search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ display:
type: full
options:
offset: 0
pagination_heading_level: h4
items_per_page: 15
total_pages: null
id: 0
Expand All @@ -303,7 +304,6 @@ display:
offset: false
offset_label: Offset
quantity: 9
pagination_heading_level: h4
exposed_form:
type: basic
options:
Expand Down
17 changes: 17 additions & 0 deletions docker/openshift/crons/menu-queue.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions docker/openshift/crons/revision-queue.sh
Original file line number Diff line number Diff line change
@@ -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
34 changes: 19 additions & 15 deletions public/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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';
Expand Down