Does cron work at all?

Created on 22 August 2024, 3 months ago

Problem/Motivation

I suppose this is more of a question, but I am trying to see exactly how the cron of this module works, and I'm a bit confused by the code in this module, specifically the lines...

function bynder_cron() {
  $last_update = \Drupal::state()->get('bynder_cache_last_update', 0);
  if ($last_update && (($last_update + \Drupal::config('default')->get('cache_lifetime')) < \Drupal::time()->getRequestTime())) {

I don't know what "\Drupal::config('default')->get('cache_lifetime')" is intending to do, but this is NULL for me, and I don't know what "default" is referring to...
This seems like it can't work to me...?

Has this code ever worked?

πŸ’¬ Support request
Status

Active

Version

4.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dpagini

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @dpagini
  • πŸ‡ΊπŸ‡ΈUnited States dpagini

    Assuming this should be \Drupal::config('bynder.settings')->get('cache_lifetime')? I'm unclear what this code is doing though. Is this maybe a cached version of what the custom metaproperties are?

  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    Yes, this is clearly wrong, it should be bynder.settings.

    But tags and other metadata information is mostly a leftover from before the switch to the CompactView, when the Browser was implemented natively in Drupal through API calls.

    So, you can pretty much ignore this.

  • πŸ‡ΊπŸ‡ΈUnited States dpagini

    Thanks for the background. Sorry for the title, changing it here. I had a hard time following what the ::updateCachedData() method was doing, I was thinking that maybe it was updating like the list of custom fields and that type of meta data. But it sounds like that's not the case?

Production build 0.71.5 2024