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 #770

Merged
merged 1 commit 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
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
label: Bild
label: 'Bild (stöds på andra språk)'
15 changes: 7 additions & 8 deletions conf/cmi/search_api.index.news.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ langcode: en
status: true
dependencies:
config:
- field.storage.node.field_main_image_caption
- field.storage.media.field_media_image
- field.storage.node.field_main_image
- field.storage.media.field_photographer
- field.storage.node.field_main_image
- field.storage.node.field_main_image_caption
- field.storage.node.field_news_groups
- field.storage.node.field_news_neighbourhoods
- field.storage.node.field_news_item_tags
- field.storage.node.field_news_neighbourhoods
- field.storage.node.field_short_title
- search_api.server.news
module:
- node
- media
- taxonomy
- publication_date
- search_api
- helfi_etusivu
- helfi_react_search
- media
- node
- publication_date
- taxonomy
id: news
name: news
description: ''
Expand Down
3 changes: 1 addition & 2 deletions conf/cmi/search_api.index.news_terms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ dependencies:
config:
- search_api.server.news
module:
- taxonomy
- search_api
- helfi_etusivu
- helfi_react_search
- taxonomy
id: news_terms
name: news-terms
description: ''
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