|
|
|
@ -71,7 +71,7 @@ func ConnectDB(baseURL string, arangoUser string, arangoPWD string, arangoDataba
|
|
|
|
|
return driver, ctx, fmt.Errorf("connectDB: FUCK HOW DID THIS EXCUTE?")
|
|
|
|
|
}
|
|
|
|
|
func InitDatabase() (err error) {
|
|
|
|
|
arangoDB, arangoCTX, err = ConnectDB("http://192.168.45.8:8529/", "gma-inator", "gma-inator", "gma-inator")
|
|
|
|
|
arangoDB, arangoCTX, err = ConnectDB(common.ArangoHost, common.ArangoUser, common.ArangoPass, common.ArangoDatabase)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
@ -119,7 +119,7 @@ func bla() error {
|
|
|
|
|
sem := common.NewSemaphore(ConcurrencyLimit)
|
|
|
|
|
wg := sync.WaitGroup{}
|
|
|
|
|
|
|
|
|
|
entries, err := os.ReadDir("/mnt/SC9000/storagePool2/")
|
|
|
|
|
entries, err := os.ReadDir("/zpool0/cheetah/workshop/garrysmod/gma-inator/chunks/")
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
@ -166,14 +166,14 @@ func bla() error {
|
|
|
|
|
DoneTaskCount <- 1
|
|
|
|
|
}()
|
|
|
|
|
//fmt.Printf("Scanning For Local Pools, found %s:", job)
|
|
|
|
|
tarFinalPath := filepath.Join("/mnt/SC9000/storagePool2/", job)
|
|
|
|
|
tarFinalPath := filepath.Join("/zpool0/cheetah/workshop/garrysmod/gma-inator/chunks/", job)
|
|
|
|
|
_, err = os.Stat(tarFinalPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Println(err)
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
parts := strings.Split(job, ".")
|
|
|
|
|
jsonPath := filepath.Join("/mnt/SC9000/storagePool2/", fmt.Sprintf("%s.json", parts[0]))
|
|
|
|
|
jsonPath := filepath.Join("/zpool0/cheetah/workshop/garrysmod/gma-inator/chunks/", fmt.Sprintf("%s.json", parts[0]))
|
|
|
|
|
_, err = os.Stat(jsonPath)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Println(err)
|
|
|
|
|