update build script, string changes

This commit is contained in:
Cyberes 2024-03-17 20:42:07 -06:00
parent 56be07c0a7
commit 6348f33658
3 changed files with 14 additions and 11 deletions

View File

@ -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

View File

@ -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{}{
"busy": atomic.LoadInt32(&globals.DirectoryCrawlers.BusyWorkers), "workers": map[string]interface{}{
"alive": config.GetConfig().DirectoryCrawlWorkers, "busy": atomic.LoadInt32(&globals.DirectoryCrawlers.BusyWorkers),
"alive": config.GetConfig().DirectoryCrawlWorkers,
},
"queueSize": globals.DirectoryCrawlers.Queue.GetQueuedJobs(),
"initialCrawlElapsed": config.InitialCrawlElapsed,
}, },
"queue": map[string]interface{}{
"items": globals.DirectoryCrawlers.Queue.GetQueuedJobs(),
},
"initialCrawlElapsed": config.InitialCrawlElapsed,
"elastic": map[string]interface{}{ "elastic": map[string]interface{}{
"workers": elasticWorkers, "workers": elasticWorkers,
"syncRunning": map[string]interface{}{ "syncRunning": map[string]interface{}{

View File

@ -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
} }