-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #453 from City-of-Helsinki/develop
Release 13.9.
- Loading branch information
Showing
32 changed files
with
288 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
uuid: 310bcedf-04c9-4684-b38f-6244b1348e47 | ||
langcode: fi | ||
status: true | ||
dependencies: | ||
module: | ||
- asu_clear_cache | ||
title: 'Default cron handler' | ||
id: asu_clear_cache_cron | ||
weight: 1 | ||
module: asu_clear_cache | ||
callback: asu_clear_cache_cron | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '*/5+@ * * * *' | ||
launcher: | ||
id: serial | ||
configuration: | ||
timeouts: | ||
lock_timeout: 3600 | ||
launcher: | ||
thread: 0 | ||
logger: | ||
id: database | ||
configuration: | ||
method: '3' | ||
expire: 1209600 | ||
retain: 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
conf/cmi/ultimate_cron.job.ultimate_cron_queue_asu_content_queue_worker.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uuid: ed515030-6598-4b75-b0fd-657a69367024 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- asu_content | ||
title: 'Queue: Asu content apartment update worker' | ||
id: ultimate_cron_queue_asu_content_queue_worker | ||
weight: -1 | ||
module: asu_content | ||
callback: 'ultimate_cron.queue_worker:queueCallback' | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '* * * * *' | ||
launcher: | ||
id: serial | ||
logger: | ||
id: database |
20 changes: 20 additions & 0 deletions
20
conf/cmi/ultimate_cron.job.ultimate_cron_queue_entity_reference_revisions_orphan_purger.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uuid: 51744f57-3447-48d6-8386-2280c3eea12a | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- entity_reference_revisions | ||
title: 'Queue: Entity Reference Revisions Orphan Purger' | ||
id: ultimate_cron_queue_entity_reference_revisions_orphan_purger | ||
weight: 8 | ||
module: entity_reference_revisions | ||
callback: 'ultimate_cron.queue_worker:queueCallback' | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '* * * * *' | ||
launcher: | ||
id: serial | ||
logger: | ||
id: database |
20 changes: 20 additions & 0 deletions
20
conf/cmi/ultimate_cron.job.ultimate_cron_queue_entity_usage_regenerate_queue.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uuid: 4c346814-7761-4eb9-ba08-fd4eb7ac723c | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- entity_usage | ||
title: 'Queue: Entity Usage Regenerate Tracking Queue' | ||
id: ultimate_cron_queue_entity_usage_regenerate_queue | ||
weight: 9 | ||
module: entity_usage | ||
callback: 'ultimate_cron.queue_worker:queueCallback' | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '* * * * *' | ||
launcher: | ||
id: serial | ||
logger: | ||
id: database |
20 changes: 20 additions & 0 deletions
20
conf/cmi/ultimate_cron.job.ultimate_cron_queue_imagecache_external_flush_images.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uuid: 1fafd13b-580e-4bfb-833f-4f106f84f313 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- imagecache_external | ||
title: 'Queue: Imagechache external flush images.' | ||
id: ultimate_cron_queue_imagecache_external_flush_images | ||
weight: 10 | ||
module: imagecache_external | ||
callback: 'ultimate_cron.queue_worker:queueCallback' | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '* * * * *' | ||
launcher: | ||
id: serial | ||
logger: | ||
id: database |
20 changes: 20 additions & 0 deletions
20
conf/cmi/ultimate_cron.job.ultimate_cron_queue_locale_translation.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uuid: e7504516-b20b-41e8-8fcf-2b29fa22e56e | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- locale | ||
title: 'Queue: Update translations' | ||
id: ultimate_cron_queue_locale_translation | ||
weight: 12 | ||
module: locale | ||
callback: 'ultimate_cron.queue_worker:queueCallback' | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '* * * * *' | ||
launcher: | ||
id: serial | ||
logger: | ||
id: database |
20 changes: 20 additions & 0 deletions
20
conf/cmi/ultimate_cron.job.ultimate_cron_queue_media_entity_thumbnail.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
uuid: 0a8680f1-97c8-4cc4-b7fb-6f50f4199d76 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- media | ||
title: 'Queue: Thumbnail downloader' | ||
id: ultimate_cron_queue_media_entity_thumbnail | ||
weight: 11 | ||
module: media | ||
callback: 'ultimate_cron.queue_worker:queueCallback' | ||
scheduler: | ||
id: simple | ||
configuration: | ||
rules: | ||
- '* * * * *' | ||
launcher: | ||
id: serial | ||
logger: | ||
id: database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
public/modules/custom/asu_clear_cache/asu_clear_cache.info.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: 'ASU - Clear cache' | ||
type: module | ||
description: 'ASU - Clear cache cron.' | ||
core: 8.x | ||
core_version_requirement: ^8 || ^9 || ^10 | ||
package: 'ASU' |
32 changes: 32 additions & 0 deletions
32
public/modules/custom/asu_clear_cache/asu_clear_cache.module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use Drupal\node\Entity\Node; | ||
|
||
/** | ||
* @file | ||
* Contains asu_clear_cache.module. | ||
*/ | ||
|
||
/** | ||
* Implements hook_cron(). | ||
*/ | ||
function asu_clear_cache_cron() { | ||
$time_ago = strtotime('-5 minutes'); | ||
$database = \Drupal::database(); | ||
$query = $database->select('node_field_data', 'n'); | ||
$query->condition('n.type', 'project'); | ||
$query->condition('n.status', 1); | ||
$query->condition('n.changed', $time_ago, '>='); | ||
$query->fields('n', ['nid']); | ||
|
||
$projects = $query->execute()->fetchAll(); | ||
|
||
if (count($projects) > 0) { | ||
foreach ($projects as $project) { | ||
$project = Node::load($project->nid); | ||
// Clear listing page cache. | ||
$cid = 'asu_rest:apartment_list:' . $project->getOwnershipType(); | ||
\Drupal::cache()->delete($cid); | ||
} | ||
} | ||
} |
Oops, something went wrong.