-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add cache-edit-mapping and cache-add-redis-store for Moodle 405 #501
base: master
Are you sure you want to change the base?
Conversation
we have the same problem, no moosh command works. i can work around the problem by commenting out the line moodle 4.5.0 |
Same here; all commands are failing. I do not want to add self::$BOOTSTRAP_FULL_NO_ADMIN_CHECK; for every command that I use, I need a most maintainable solution. Removing the config items means failing back to the standard session management, and that works, obviously. I spent some hours to find a proper way to start a session from moosh, but already with the defined handler, in my case it is redis. No luck so far. |
@benyovszky could you try the latest version and option |
I have no access currently to my dev env, but ommitting the login means that we loose logging. And if i have redis based session caching configured I need to set this no-login flag for all commands, means I loose logging for all moosh based modification, that I would not accept as a trade-off. |
@tmuras I have tested the commit (3b0ae7d) The results are as I expected:
|
"If the switch is set on, there is no user info in log entries." I'm not sure how to handle it well by default. I now think it's a bit unusual to login user when executing CLI script - Moodle scripts do not do it. Perhaps the default should be to (whenever possible) execute the CLI script without performing any user login - unless the option like --user= is given. |
In the latest commit I've added -o / --options option. Have a look if that works for you @benyovszky and @rimkov . |
Related issue: #500
I'm quite newby with PHP so it might not be the best solution.
cache-edit-mapping
Mostly just renaming the class following this document: https://github.com/moodle/moodle/blob/main/cache/UPGRADING.md
I had a strange problem where the Moosh login function failed with the following message, if redis was already used as a sessionhandler:
Therefore I added the following code in order to avoid a login, I couldn't find a better solution:
cache-add-redis-store
Use 3 digit versions number
I started by naming the folder Moodle45 but still received errors because moosh was using Moodle310 cache-add-redis-store.
Moodle started using 3 digits number version for branch in version.php with Moodle 310.
Therefore, when I tried to use the 45 version it would pickup Moodle 310 as 310 > 45 as you can see here:
The only way to make moosh pickup the right version was to refractor the whole numbering to start using 3 digit.