Loading dropfort_update.install +0 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ * Install tasks for Dropfort Update. */ use Drupal\Component\Utility\Random; /** * Implements hook_requirements(). */ Loading dropfort_update.module +8 −2 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use GuzzleHttp\Exception\RequestException; use Drupal\Component\Utility\UrlHelper; use Drupal\update\UpdateFetcherInterface; use Drupal\Component\Serialization\Json; /** * Implements hook_cron(). Loading Loading @@ -75,7 +76,7 @@ function dropfort_update_send_status(array $options = NULL) { 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'body' => json_encode($data), 'body' => Json::encode($data), 'method' => 'POST', 'max_redirects' => 3, // We set a lower timeout since we don't want the user Loading @@ -97,7 +98,12 @@ function dropfort_update_send_status(array $options = NULL) { // If that's the case, have Dropfort Update try again sooner. $last_status = time(); foreach ($data['update_status'] as $item) { if (in_array($item['status'], [UpdateFetcherInterface::NOT_FETCHED, UpdateFetcherInterface::FETCH_PENDING])) { if (in_array($item['status'], [ UpdateFetcherInterface::NOT_FETCHED, UpdateFetcherInterface::FETCH_PENDING, ] )) { // Set the last status to an hour ago since we didn't get a full // status run. We'll take the existing data but we treat this // as if it hadn't run so it gets run again next cron. Loading Loading
dropfort_update.install +0 −2 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ * Install tasks for Dropfort Update. */ use Drupal\Component\Utility\Random; /** * Implements hook_requirements(). */ Loading
dropfort_update.module +8 −2 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use GuzzleHttp\Exception\RequestException; use Drupal\Component\Utility\UrlHelper; use Drupal\update\UpdateFetcherInterface; use Drupal\Component\Serialization\Json; /** * Implements hook_cron(). Loading Loading @@ -75,7 +76,7 @@ function dropfort_update_send_status(array $options = NULL) { 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'body' => json_encode($data), 'body' => Json::encode($data), 'method' => 'POST', 'max_redirects' => 3, // We set a lower timeout since we don't want the user Loading @@ -97,7 +98,12 @@ function dropfort_update_send_status(array $options = NULL) { // If that's the case, have Dropfort Update try again sooner. $last_status = time(); foreach ($data['update_status'] as $item) { if (in_array($item['status'], [UpdateFetcherInterface::NOT_FETCHED, UpdateFetcherInterface::FETCH_PENDING])) { if (in_array($item['status'], [ UpdateFetcherInterface::NOT_FETCHED, UpdateFetcherInterface::FETCH_PENDING, ] )) { // Set the last status to an hour ago since we didn't get a full // status run. We'll take the existing data but we treat this // as if it hadn't run so it gets run again next cron. Loading