Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296300

Use the exact current time in KV and tempstore.

$
0
0

Problem/Motivation

The Brightcove module needs API access tokens, which expire every 5 minutes. Thereby it is using the KV expireable to invalidate these access tokens.
In a normal HTTP request, this is cool, but during a migration we ran into an issue, when the migration actually executes for longer than 5 minutes.
Along the long-running migration process, we REQUEST_TIME used inside the KV expireable never changes, even the real world time moves on.

Proposed resolution

Use the actual time in \Drupal\Core\KeyValueStore\DatabaseStorageExpirable. \Drupal\user\SharedTempStore and \Drupal\user\PrivateTempStore by leveraging the datetime.time service and its ::getCurrentTime method.

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 296300


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>