You are here

function zoomapi_get_unsuccessful_recording_download_uuids in Zoom API 7.2

Get unsuccessful recording downloads meeting uuid.

1 call to zoomapi_get_unsuccessful_recording_download_uuids()
zoomapi_cron in ./zoomapi.module
Implements hook_cron().

File

./zoomapi.module, line 1082
Main file for the Zoom API module.

Code

function zoomapi_get_unsuccessful_recording_download_uuids($max_attempts = NULL, $how_far_back = NULL) {
  $max_attempts = $max_attempts ?: variable_get('zoomapi_recordings_download_max_attempts', 3);
  $how_far_back = $how_far_back ?: variable_get('zoomapi_recordings_download_how_far_back', '-30 days');
  $uuids = db_query("\n    SELECT\n      meeting_uuid\n    FROM {zoomapi_recordings_download_tracker}\n    WHERE realm = :realm\n    AND success = :nosuccess\n    AND :max_attempts > attempts\n    AND created >= :created_after\n  ", [
    ':realm' => zoomapi_realm(),
    ':nosuccess' => 0,
    ':max_attempts' => $max_attempts,
    ':created_after' => strtotime($how_far_back),
  ])
    ->fetchCol();
  return $uuids;
}