mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-10 04:44:51 +00:00
Delete old probe logs older than 1 month +2 days
This commit is contained in:
parent
f931066c8c
commit
738c0826c8
1 changed files with 2 additions and 2 deletions
|
@ -176,8 +176,8 @@ func (repo *CronRepo) execCron(slug string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *CronRepo) deleteOldProbeLogs() {
|
func (repo *CronRepo) deleteOldProbeLogs() {
|
||||||
// for now, we only delete stats older than 2 days
|
// for now, we only delete stats older than 1 month +2 days
|
||||||
startTs := time.Now().AddDate(0, 0, -2).Unix()
|
startTs := time.Now().AddDate(0, -1, -2).Unix()
|
||||||
query := `DELETE FROM tbl_probe_log WHERE date_checked < ?`
|
query := `DELETE FROM tbl_probe_log WHERE date_checked < ?`
|
||||||
_, err := repo.db.Exec(query, startTs)
|
_, err := repo.db.Exec(query, startTs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue