Fix crons to actually run correctly using the configuration values

This commit is contained in:
DaneEveritt
2022-07-24 15:59:17 -04:00
parent 4634c93182
commit 251f91a08e
4 changed files with 17 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ import (
type activityCron struct {
mu *system.AtomicBool
manager *server.Manager
max int64
max int
}
// Run executes the cronjob and ensures we fetch and send all of the stored activity to the
@@ -30,7 +30,7 @@ func (ac *activityCron) Run(ctx context.Context) error {
var activity []models.Activity
tx := database.Instance().WithContext(ctx).
Where("event NOT LIKE ?", "server:sftp.%").
Limit(int(ac.max)).
Limit(ac.max).
Find(&activity)
if tx.Error != nil {