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

Mutex for actualize script #5235

Merged
merged 5 commits into from Mar 31, 2023
Merged

Mutex for actualize script #5235

merged 5 commits into from Mar 31, 2023

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Mar 28, 2023

In the case of extremely long cron jobs that are refreshing feeds, a cron job might start before the previous one has completed, leading to an accumulation of cron jobs running in parallel.
Although we already have a mutex preventing concurrency problems on a single feed refresh, the problem occurs in particular if each feed can take a long time (e.g. due to heavy processing, which is my use-case).

#5234 must be merged first

One parameter was not used

Furthermore, that unused parameter was preventing simpler calls (i.e. without a dedicated extension class). Now it is possible to register a call back with a lamda:

```php
Minz_ExtensionManager::addHook('feed_before_actualize', function () {
	// Hello
});
```
In the case of extremely long cron jobs that are refreshing feeds, a cron job might start before the previous one has completed, leading to an accumulation of cron jobs running in parallel.
Although we already have a mutex preventing concurrency problems on a single feed refresh, the problem occurs in particular if each feed can take a long time (e.g. due to heavy processing, which is my usecase).
FreshRSS#5234 must be merged first
@Alkarex Alkarex merged commit 0f5e321 into FreshRSS:edge Mar 31, 2023
1 check passed
@Alkarex Alkarex deleted the mutex-actualize branch March 31, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant