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

[5] add2scheduler-sessiongc #41326

Merged
merged 61 commits into from
Sep 4, 2023
Merged

Conversation

alikon
Copy link
Contributor

@alikon alikon commented Aug 6, 2023

Summary of Changes

move sessiongc from system plugin to scheduler/task plugin

Testing Instructions

Hint: The execution times and hours shown for tasks in the administrator are in the UTC timezone.

New installation

Make a new installation with this PR applied.

Check if there is an enabled task scheduler plugin "Task - Session Data Purge".

Check if there is an enabled scheduled task "SessionGC" using that plugin.

Check that the new task shall run every 24 hours at the hour when the Joomla installation was made.

Update

On a Joomla 4.4-dev version or 4.4.0 alpha 4, note the endabled status and the configuration parameters of the "System - Session Data Purge" plugin.

Now either disable that plugin or enable it and optionally change some of the configuration parameters to a value different to the default.

Update to the patched package or custom update URL created by Drone for this PR.

Check if the "System - Session Data Purge" plugin has been uninstalled.

Check if there is a task scheduler plugin "Task - Session Data Purge".

Check enabled status and configuration parameters of that plugin.

Check if there is a scheduled task "SessionGC" using that plugin. If so, check the configuration parameters, too.

Repeat the previous steps with different endabled status and configuration parameters of the "System - Session Data Purge" plugin.

Actual result BEFORE applying this Pull Request

Deletion of outdated session data is done with the "System - Session Data Purge" plugin.

Expected result AFTER applying this Pull Request

New installation

The "Task - Session Data Purge" plugin is enabled, and a scheduled task "SessionGC" is enabled to run every 24 hours at the hour of the Joomla installation.

Update

The "System - Session Data Purge" plugin has been uninstalled by the update.

A new task scheduler plugin "Task - Session Data Purge" has been created and is enabled.

If the old "System - Session Data Purge" plugin was enabled before the update, a new scheduled task "SessionGC" has been created and is enabled.

It will execute every 24 hours at the hour of the Joomla installation.

The configuration parameters "Enable Session Data Cleanup", "Enable Session Metadata Cleanup", "Probability" and "Divisor" of that task are set to the same values as the same parameters in the old system plugin's parameters:

If the old "System - Session Data Purge" plugin was disabled before the update, there is no task for that plugin.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: link will be added later

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-5.0-dev labels Aug 6, 2023
@heelc29
Copy link
Contributor

heelc29 commented Aug 6, 2023

Where is the code to add the task in the database for new J5.0 installations?

@richard67
Copy link
Member

Where is the code to add the task in the database for new J5.0 installations?

@alikon @heelc29 is right: As on a new J5 installation the secciongc plugin would be enabled by default, it needs something like this here: https://github.com/joomla/joomla-cms/pull/40788/files#diff-fa733b616bbcc3e559d5003d630a5ba449c1cec34c00d1f44aa6d6c7d1dc75d0

@richard67
Copy link
Member

richard67 commented Sep 3, 2023

The language strings for the backend, e.g. the plugin name, are not translated. The reason could be the casing of the Plugin PHP files, "SessionGC" instead of "Sessiongc".

@richard67
Copy link
Member

richard67 commented Sep 3, 2023

I have tested this item 🔴 unsuccessfully on cc22a2a

The language strings for the task in backend, e.g. the task type in the task list, or the parameter labels and descriptions in the form, are not translated. The reason could be the casing of the Plugin PHP files, "SessionGC" instead of "Sessiongc".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41326.

@HLeithner HLeithner merged commit db8cc65 into joomla:5.0-dev Sep 4, 2023
@HLeithner
Copy link
Member

thanks richard for finishing this pr.

@alikon alikon deleted the add2scheduler-sessiogc branch September 4, 2023 17:09
@alikon
Copy link
Contributor Author

alikon commented Sep 4, 2023

thank you all for your help

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.

6 participants