|
@@ -10,7 +10,6 @@ import (
|
|
|
"io/fs"
|
|
|
"os"
|
|
|
"path/filepath"
|
|
|
- "strings"
|
|
|
"syscall"
|
|
|
"time"
|
|
|
)
|
|
@@ -43,14 +42,10 @@ func clarksonsWatch() {
|
|
|
if ok {
|
|
|
existModifyTimeStr := existModifyTime.(string)
|
|
|
if existModifyTimeStr != modifyTimeStr {
|
|
|
- if strings.Contains(path, "克拉克森") {
|
|
|
- err = Clarksons(path)
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if strings.Contains(path, "克拉克森") {
|
|
|
err = Clarksons(path)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ err = Clarksons(path)
|
|
|
}
|
|
|
cacheClient.Delete(path)
|
|
|
cacheClient.Set(path, modifyTimeStr, 24*time.Hour)
|
|
@@ -66,7 +61,7 @@ func Clarksons(path string) (err error) {
|
|
|
utils.FileLog.Info(fmt.Sprintf("Clarksons, Err: %s", err))
|
|
|
}
|
|
|
}()
|
|
|
- path = "/Users/xi/Desktop/SIN_Timeseries_20241217022653.xlsx"
|
|
|
+
|
|
|
|
|
|
var xlFile *xlsx.File
|
|
|
exist, err := PathExists(path)
|