aboutsummaryrefslogtreecommitdiff
path: root/Maintenance/schedulemaintenance.cpp
blob: 3a2decdc7dffb2100875bb66a9a66339d2aa86a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "maintenance.h"

bool Maintenance::scheduleMaintenance()
{
    // set update timer
    connect(&_maintenanceTimer, &QTimer::timeout, this, &Maintenance::onMaintenanceTimerAction);

    _maintenanceTimer.setInterval( _coreObject->Settings.MaintenanceSettings.timeMaintenanceInterval_s * 1000);
    _maintenanceTimer.start();

    // complete startup
    _coreObject->Log.logEvent("info", QStringLiteral("performing maintenance every %1 seconds")
                            .arg(_coreObject->Settings.MaintenanceSettings.timeMaintenanceInterval_s));

    return true;
}