package main

import (
	"fmt"
	"runtime"
	"sync"
	"time"
)

var (
	basePath = "../../../../storage/app/imports/"
)

var (
	Reset  = "\033[0m"
	Red    = "\033[31m"
	Green  = "\033[32m"
	Yellow = "\033[33m"
	Blue   = "\033[34m"
)

func main() {
	runtime.GOMAXPROCS(4)
	start := time.Now()
	var wg sync.WaitGroup

	wg.Add(4)
	go ExecLanguages(&wg)
	go ExecCompanies(&wg)
	go ExecCourses(&wg)
    go ExecNeighbourhoods(&wg)
	wg.Wait()
	wg.Add(3)
	go ExecEducation(&wg)
	go ExecSkills(&wg)
    go ExecJobs(&wg)
	wg.Wait()
    wg.Add(3)
    go ExecApplications(&wg)
    go ExecExperiences(&wg)
    go ExecCandidates(&wg)
    wg.Wait()
	end := time.Now()
	elapsed := end.Sub(start)
	fmt.Println(Green + "Finished in " + elapsed.String() + Reset)
}
