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

[Feature request] Add maintenance hooks #3398

Closed
aledeg opened this issue Jan 25, 2021 · 2 comments · Fixed by #3440
Closed

[Feature request] Add maintenance hooks #3398

aledeg opened this issue Jan 25, 2021 · 2 comments · Fixed by #3440
Labels
Extension 🔌 System care Everything related to the system care
Milestone

Comments

@aledeg
Copy link
Member

aledeg commented Jan 25, 2021

I think it could be useful to introduce new hooks for the extension system.
I am thinking hooks that can be use for maintenance purposes. It could be at the system level (perform a vacuum on sqlite databases), at the user level (remove useless configuration), or at the feed level (modify existing article content).

At the moment, we have the feed_before_insert hook which could be used for the feed level but it is triggered (as far as I understand) only when the feed is updated.
We also have the freshrss_init hook which could be used for the system level but it is trigger for every calls. It's probably too much for a maintenance task.

What I envisioned is hooks that are triggered only during the actualize_script.php process. In the file itself, we could have the hook at the system level and the hook at the user level. The hook at the feed level would have to be in the feedController.php process.

I suggest the following names:

  • freshrss_system_maintenance
  • freshrss_user_maintenance
  • freshrss_feed_maintenance
@Alkarex
Copy link
Member

Alkarex commented Feb 1, 2021

Sounds good!

@aledeg aledeg added the System care Everything related to the system care label Feb 6, 2021
aledeg added a commit to aledeg/FreshRSS that referenced this issue Feb 11, 2021
The new hook allows to add maintenance extensions at the user level.

See FreshRSS#3398
aledeg added a commit to aledeg/FreshRSS that referenced this issue Feb 11, 2021
The new hook allows to add maintenance extensions at the user level.

See FreshRSS#3398
@aledeg aledeg mentioned this issue Feb 11, 2021
4 tasks
@aledeg
Copy link
Member Author

aledeg commented Feb 11, 2021

Well, the user hook was straightforward to write.
But I don't know how the system hook could work. I've tried a few different things without success.
For the feed hook, I am reconsidering it since the feed_before_actualize could almost fulfill the same role.

Alkarex pushed a commit that referenced this issue Feb 17, 2021
The new hook allows to add maintenance extensions at the user level.

See #3398
@Alkarex Alkarex modified the milestones: Backlog, 1.18.0 Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extension 🔌 System care Everything related to the system care
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants