Last active
June 14, 2019 18:49
-
-
Save superbiche/4dc012f65fb38d4a369925229a29e374 to your computer and use it in GitHub Desktop.
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
diff --git a/simple_oauth.module b/simple_oauth.module | |
index deba4e1..b4e7904 100644 | |
--- a/simple_oauth.module | |
+++ b/simple_oauth.module | |
@@ -19,19 +19,20 @@ use Drupal\user\RoleInterface; | |
/** | |
* Implements hook_cron(). | |
*/ | |
+ | |
function simple_oauth_cron() { | |
/** @var \Drupal\simple_oauth\ExpiredCollector $collector */ | |
- $collector = \Drupal::service('simple_oauth.expired_collector'); | |
- $config = \Drupal::config('simple_oauth.settings'); | |
- $logger = \Drupal::logger('simple_oauth'); | |
- $token_cron_batch_size = $config->get('token_cron_batch_size'); | |
+ // $collector = \Drupal::service('simple_oauth.expired_collector'); | |
+ // $config = \Drupal::config('simple_oauth.settings'); | |
+ // $logger = \Drupal::logger('simple_oauth'); | |
+ // $token_cron_batch_size = $config->get('token_cron_batch_size'); | |
// Deleting one batch of expired tokens. | |
- if (!empty($expired_tokens = $collector->collect($token_cron_batch_size))) { | |
- $collector->deleteMultipleTokens($expired_tokens); | |
- $logger->notice('Deleted @limit expired tokens in cron.', [ | |
- '@limit' => $token_cron_batch_size, | |
- ]); | |
- } | |
+ //if (!empty($expired_tokens = $collector->collect($token_cron_batch_size))) { | |
+ // $collector->deleteMultipleTokens($expired_tokens); | |
+ // $logger->notice('Deleted @limit expired tokens in cron.', [ | |
+ // '@limit' => $token_cron_batch_size, | |
+ // ]); | |
+ //} | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment