Code Monkey home page Code Monkey logo

Comments (3)

brendanheywood avatar brendanheywood commented on May 29, 2024

Hmm, In theory it should tell you why it failed if it does a dry run. Can you double check all these conditions are true and let me know which condition isn't being correctly reported back:

  • It can only be run from the CLI. There is no GUI.
  • We store the hostname in the cleaning configuration data. If the hostname matches production, DataCleaner will not run. If this data is missing then it will not run.
  • Typically a refreshed database will be from a nightly snapshot and so the data should be slightly stale. If a non admin user has logged in recently, that's a sign this Moodle is being used, and the DataCleaner will not run.
  • If cron has run recently, DataCleaner will not run. This should only be run on a data washing instance, cron should not be needed here.
  • It can only be run if and only if a 'local_datacleaner_allowexecution = true;' has been added to config.php

from moodle-local_datacleaner.

Nicosoft avatar Nicosoft commented on May 29, 2024

I double checked the conditions and I believe all the conditions are respected.

I an using Xdebug to follow the execution. In the screenshot 1, you can see the values used in function safety_checks() in --run mode.
-- screenshot 1:
1_run_values

When executed in --dryrun or --run the function safety_checks() returns FALSE. So I believe this is correct.

I have more concern when the object cleaner_users/clean is constructed. When executed in --run mode, cleaner_users\clean->dryrun = TRUE; I believe the correct value should FALSE not TRUE. (Please see the screenshot 2)
-- screenshot 2:
2_run_construct

So obviously when the method execute() is called, because of the value of $dryrun, method stops before any update.
-- screenshot 3:
3_run_execute

What do you think?

from moodle-local_datacleaner.

roperto avatar roperto commented on May 29, 2024

Hi Nico,

The data scrambler was refactored and a few issues with dryrun fixed, as a result I cannot reproduce that issue anymore.

Please, if you find out that there is a similar issue with the new version feel free to reopen it or create a new one, I will gladly look into it.

Cheers,

Daniel

from moodle-local_datacleaner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.