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] persist recurring task timestamps in the database #2492

Open
mirabilos opened this issue Jan 5, 2024 · 4 comments
Open

[feature] persist recurring task timestamps in the database #2492

mirabilos opened this issue Jan 5, 2024 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@mirabilos
Copy link
Contributor

Is your feature request related to a problem ?

The ability to manually set the schedule for one recurring task (media cleanup) was recently added.

However, it seems that, after (re‑)starting GtS, the task is always scheduled for the very next occurrence of the hour/minute given, even if it ran much less than media-cleanup-every (e.g. 72h) ago.

Describe the solution you'd like.

For those tasks, persist the time they last ran, so intermediate restarts of GtS won’t schedule them more often, but a start after having missed one will.

Describe alternatives you've considered.

Not restart GtS daily. (I’m doing so now, the daily restart was more of an attempt to get performance back under control on the old VM but I’ve moved to a new one, and it seems I underestimated the background jobs running on the old one.)

Additional context.

No response

@mirabilos mirabilos added the enhancement New feature or request label Jan 5, 2024
@tsmethurst
Copy link
Contributor

Why do you need to restart daily? I don't really understand. What's the performance gain here?

@mirabilos
Copy link
Contributor Author

mirabilos commented Jan 5, 2024 via email

@tsmethurst
Copy link
Contributor

What I think happened is that some cronjob on the system from the other thing it runs swapped GtS’ cache memory, so access to it was slow

Ah okay, that's annoying!

Tracking task progress in the database is something we're considering for another feature (pausing/resuming/retrying message deliveries). This could be something we could fold into that work if time allows.

@mirabilos
Copy link
Contributor Author

mirabilos commented Jan 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants