@@ -258,42 +258,6 @@ function drupal_get_env(string|array $variables) : mixed {
258258 $ config ['helfi_proxy.settings ' ]['session_suffix ' ] = $ session_suffix ;
259259}
260260
261- $ amq_destination = drupal_get_env ([
262- 'PROJECT_NAME ' ,
263- ]);
264- $ amq_brokers = getenv ('AMQ_BROKERS ' );
265-
266- if ($ amq_brokers && $ amq_destination ) {
267- $ settings ['stomp ' ]['default ' ] = [
268- 'clientId ' => getenv ('AMQ_CLIENT_ID ' ) ?: 'client_ ' . $ amq_destination ,
269- 'login ' => getenv ('AMQ_USER ' ) ?: NULL ,
270- 'passcode ' => getenv ('AMQ_PASSWORD ' ) ?: NULL ,
271- 'destination ' => sprintf ('/queue/%s ' , $ amq_destination ),
272- 'brokers ' => $ amq_brokers ,
273- 'timeout ' => ['read ' => 12000 ],
274- 'heartbeat ' => [
275- 'send ' => 20000 ,
276- 'receive ' => 0 ,
277- 'observers ' => [
278- [
279- 'class ' => '\Stomp\Network\Observer\HeartbeatEmitter ' ,
280- ],
281- ],
282- ],
283- ];
284-
285- $ queues = [
286- 'helfi_navigation_menu_queue ' ,
287- 'helfi_api_base_revision ' ,
288- ];
289- foreach ($ queues as $ queue ) {
290- // $settings['queue_service_' . $queue] = 'queue.stomp.default';
291- }
292- // You must configure project specific queues manually in 'all.settings.php'
293- // file.
294- // @see https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/queue.md
295- }
296-
297261if (
298262 ($ redis_host = getenv ('REDIS_HOST ' )) &&
299263 file_exists ('modules/contrib/redis/redis.services.yml ' ) &&
@@ -401,6 +365,12 @@ function drupal_get_env(string|array $variables) : mixed {
401365 $ config ['helfi_search.settings ' ]['openai_model ' ] = getenv ('OPENAI_MODEL ' );
402366}
403367
368+ // Hakuvahti:
369+ if (getenv ('HAKUVAHTI_URL ' )) {
370+ $ config ['helfi_hakuvahti.settings ' ]['base_url ' ] = getenv ('HAKUVAHTI_URL ' );
371+ $ config ['helfi_hakuvahti.settings ' ]['api_key ' ] = getenv ('HAKUVAHTI_API_KEY ' );
372+ }
373+
404374// E2E test users. We should never do this in production, so adding a failsafe
405375// in case the environment variable would ever end up in production.
406376if (getenv ('APP_ENV ' ) !== 'production ' && $ e2e_test_user = getenv ('E2E_TEST_USER ' )) {
0 commit comments