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