Commit 5be80f75 authored by drumm's avatar drumm
Browse files

Issue #3117465: Reset static caches while loading all releases

parent 436696b0
......@@ -64,10 +64,11 @@ function project_usage_update_7003() {
->entityCondition('bundle', project_release_release_node_types())
->execute();
if (isset($result['node'])) {
foreach (array_chunk(array_keys($result['node']), 50) as $releases) {
foreach (array_chunk(array_keys($result['node']), 200) as $releases) {
foreach (node_load_multiple($releases, [], TRUE) as $release) {
$project_release_nids[$release->field_release_project[LANGUAGE_NONE][0]['target_id']][] = $release->nid;
}
drupal_static_reset();
}
}
foreach ($project_release_nids as $project_nid => $release_nids) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment