Skip to content

Commit

Permalink
Set the last scan time before the actual scanning to avoid multiple s…
Browse files Browse the repository at this point in the history
…can intents
  • Loading branch information
etix committed Apr 22, 2015
1 parent 83a8e9e commit 81313b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scan.go
Expand Up @@ -95,6 +95,8 @@ func Scan(typ ScannerType, r *redisobj, url, identifier string, stop chan bool)
return scanInProgress
}

s.setLastSync(conn, identifier, false)

conn.Send("MULTI")

s.filesKey = fmt.Sprintf("MIRROR_%s_FILES", identifier)
Expand All @@ -111,7 +113,6 @@ func Scan(typ ScannerType, r *redisobj, url, identifier string, stop chan bool)
// Remove the temporary key
conn.Do("DEL", s.filesTmpKey)

s.setLastSync(conn, identifier, false)
log.Error("[%s] %s", identifier, err.Error())
return err
}
Expand Down

0 comments on commit 81313b7

Please sign in to comment.