package main import ( "log" "mercury/src/db" "mercury/src/finance" "mercury/src/hr" "mercury/src/mercury" "os" "path" "time" ) func main() { s := time.Now() // local/update run //updateTelecom() //processQBARReport() // regular run //updateInsightData() updateTimesheets() f := time.Now() log.Println(f.Sub(s).Milliseconds()) } func updateTelecom() { icx := mercury.NewInterconnect() icx.PseudoInit() icx.InsightDBConnector.ExecuteSqlScript(db.NewRunner("create-mercury-telecomVoice-table.sql", db.MercuryDatabaseName)) icx.UpdateVerizonReports() } func updateTimesheets() { hr.UpdateEmployeeDirectory(path.Join("/home/dtookey/work/clarity-reporting/paycor_dir", "EmployeeRoster.csv")) hr.UpdateTimesheetReport("/home/dtookey/work/clarity-reporting/paycor") } func updateInsightData() { icx := mercury.NewInterconnect() icx.Init() icx.UpdateUsers() icx.UpdateTimeEntries() } func processQBARReport() { reportBase := os.Getenv("mercury_qb_path") log.Printf("Searching for documents in %s\n", reportBase) if len(reportBase) == 0 { log.Fatalln("please set the mercury_qb_path env var. we don't know where to look otherwise") } finance.GenerateArAgingReport(reportBase) //finance.ProcessTrialBalances(reportBase, "./updateInsightData.csv") }