update build script, string changes
This commit is contained in:
parent
56be07c0a7
commit
6348f33658
9
build.sh
9
build.sh
|
@ -10,11 +10,14 @@ fi
|
||||||
|
|
||||||
mkdir -p "$SCRIPT_DIR/dist"
|
mkdir -p "$SCRIPT_DIR/dist"
|
||||||
|
|
||||||
|
BUILDARGS="$(uname)-$(uname -p)"
|
||||||
|
OUTPUTFILE="$SCRIPT_DIR/dist/crazyfs-$BUILDARGS"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR/src" || exit 1
|
cd "$SCRIPT_DIR/src" || exit 1
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go build -v -trimpath -ldflags "-s -w -X main.VersionDate=$(date -u --iso-8601=minutes) -X main.Version=v$VERSION" -o "$SCRIPT_DIR/dist/crazyfs"
|
go build -v -trimpath -ldflags "-s -w -X main.VersionDate=$(date -u --iso-8601=minutes) -X main.Version=v$VERSION" -o "$OUTPUTFILE"
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
chmod +x "$SCRIPT_DIR/dist/crazyfs"
|
chmod +x "$OUTPUTFILE"
|
||||||
echo "Build Succeeded -> $SCRIPT_DIR/dist/crazyfs"
|
echo "Build Succeeded -> $OUTPUTFILE"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -57,14 +57,14 @@ func APIAdminCrawlsInfo(w http.ResponseWriter, r *http.Request) {
|
||||||
"active": directorycrawler.GetActiveCrawls(),
|
"active": directorycrawler.GetActiveCrawls(),
|
||||||
"finished": directorycrawler.GetFinishedCrawls(),
|
"finished": directorycrawler.GetFinishedCrawls(),
|
||||||
},
|
},
|
||||||
"crawlWorkers": map[string]interface{}{
|
"directory": map[string]interface{}{
|
||||||
|
"workers": map[string]interface{}{
|
||||||
"busy": atomic.LoadInt32(&globals.DirectoryCrawlers.BusyWorkers),
|
"busy": atomic.LoadInt32(&globals.DirectoryCrawlers.BusyWorkers),
|
||||||
"alive": config.GetConfig().DirectoryCrawlWorkers,
|
"alive": config.GetConfig().DirectoryCrawlWorkers,
|
||||||
},
|
},
|
||||||
"queue": map[string]interface{}{
|
"queueSize": globals.DirectoryCrawlers.Queue.GetQueuedJobs(),
|
||||||
"items": globals.DirectoryCrawlers.Queue.GetQueuedJobs(),
|
|
||||||
},
|
|
||||||
"initialCrawlElapsed": config.InitialCrawlElapsed,
|
"initialCrawlElapsed": config.InitialCrawlElapsed,
|
||||||
|
},
|
||||||
"elastic": map[string]interface{}{
|
"elastic": map[string]interface{}{
|
||||||
"workers": elasticWorkers,
|
"workers": elasticWorkers,
|
||||||
"syncRunning": map[string]interface{}{
|
"syncRunning": map[string]interface{}{
|
||||||
|
|
|
@ -19,7 +19,7 @@ func InitializeDirectoryCrawlerWorkers() *globals.DcWorkers {
|
||||||
dcWorkers.BusyWorkers = &d.BusyWorkers
|
dcWorkers.BusyWorkers = &d.BusyWorkers
|
||||||
globals.DirectoryCrawlers = d
|
globals.DirectoryCrawlers = d
|
||||||
|
|
||||||
log.Debugf("CRAWLERS - Started %d directory crawler workers.", config.GetConfig().DirectoryCrawlWorkers)
|
log.Debugf("CRAWLERS - Started %d directory crawl workers.", config.GetConfig().DirectoryCrawlWorkers)
|
||||||
return d
|
return d
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue