update storage set

merge-requests/4/head
Matthew 2020-01-13 18:32:43 -05:00
parent ee95daa5ef
commit a6c546dfed
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 2 additions and 1 deletions

View File

@ -95,11 +95,12 @@ func handler(status* bool) {
func checkAccountSizeAndUpdate(username string, id string) {
var size float64 = 0
var userHomeDirectory string = strings.Replace(strings.Join([]string{"/home/", string(username)}, ""), "\"", "", -1)
usernameFormat := strings.Replace(username, "\"", "", -1)
sizeHome := DirSize(&userHomeDirectory)
size += sizeHome
sizeMail := DirSize(&userHomeDirectory)
size += sizeMail
status := RedisClient.Set("storage"+"-"+string(username), size, 0)
status := RedisClient.Set("storage"+"-"+usernameFormat, size, 0)
fmt.Println(status.Name())
if status.Err() != nil {
fmt.Println(status.Err())