Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate logs in export files #301

Merged
merged 1 commit into from
Mar 22, 2021
Merged

Fix duplicate logs in export files #301

merged 1 commit into from
Mar 22, 2021

Conversation

retif
Copy link

@retif retif commented Mar 19, 2021

Related Issue/Ticket:

PRODDEV-263

Additional change in this PR is related to

if (!isset($start) && !isset($end)) { $query->range(0, self::WORKER_CHUNK_SIZE); }

This code was not reachable, so I changed the way this limit works by introducing new function setWorkerChunkSize which is called from cron handler.

Steps to test:

  • Log in as an admin
  • Enable "Open Y Virtual YMCA Log" module
  • Navigate through the site
  • In the incognito browser mode or another browser log in as a common VY user
  • Navigate through the site again
  • Ensure the logs are displayed on the /admin/virtual-y-logs page
  • Export the logs
  • See report

Quality checks:

Please check these boxes to confirm this PR covers the following cases:

  • Maintaining our upgrade path is essential. Check one or the other:
    • This PR provides updates via hook_update_N or other means.
    • No updates are necessary for this change.
  • Front end fixes should be tested against all of the Open Y Themes.
    • Tested against Carnation
    • Tested against Lily
    • Tested against Rose
    • This change does not contain front-end fixes.
  • I have flagged this PR "Needs Review" or pinged the VY devs/QA
    team in Slack

@@ -36,7 +36,9 @@ function openy_gc_log_preprocess_views_view(array &$variables) {
* Implements hook_cron().
*/
function openy_gc_log_cron() {
\Drupal::service("openy_gc_log.log_archiver")->archive();
$archiver = \Drupal::service("openy_gc_log.log_archiver");
$archiver->setWorkerChunkSize(600);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 600?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will change this to a setting, that can be modified in .settings.php

@AnastasiiaPys
Copy link

retest

@AnastasiiaPys
Copy link

Testing passed.

@AnastasiiaPys AnastasiiaPys merged commit bffec81 into fivejars:1.3 Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants