Skip to content

Commit

Permalink
Merge pull request #41 from dadosjusbr/manual-collection
Browse files Browse the repository at this point in the history
adicionando field de coleta manual
  • Loading branch information
danielfireman authored Sep 24, 2024
2 parents c755070 + 349fe3c commit 14a86bd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/dadosjusbr/proto v0.0.0-20221212025627-91c60aa3cd12
github.com/dadosjusbr/storage v0.0.0-20240617171357-618f39b02d6f
github.com/dadosjusbr/storage v0.0.0-20240923172949-d3b675a3e292
github.com/kelseyhightower/envconfig v1.4.0
google.golang.org/protobuf v1.28.1
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ github.com/dadosjusbr/storage v0.0.0-20240514131514-43ac5da3ae8a h1:1LyzfsNzKgLj
github.com/dadosjusbr/storage v0.0.0-20240514131514-43ac5da3ae8a/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/dadosjusbr/storage v0.0.0-20240617171357-618f39b02d6f h1:56frC4wo/iyKmCe/5+HvKZn5AS3fFc0KDXm/DMij8kA=
github.com/dadosjusbr/storage v0.0.0-20240617171357-618f39b02d6f/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/dadosjusbr/storage v0.0.0-20240923172949-d3b675a3e292 h1:cgrdaqWjNN9enNcWPaPtqWFbxo1bLWz9C/Lxhke4WM4=
github.com/dadosjusbr/storage v0.0.0-20240923172949-d3b675a3e292/go.mod h1:rIM/dbZMdrMfVnZgNgRNRRtsxfhSMH8S8X7MZEeKkrQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ func main() {
}
}

// A variável de ambiente só será passada quando a coleta for manual
_, manualCollection := os.LookupEnv("MANUAL_COLLECTION")

agmi := models.AgencyMonthlyInfo{
AgencyID: er.Rc.Coleta.Orgao,
Month: int(er.Rc.Coleta.Mes),
Expand Down Expand Up @@ -214,8 +217,9 @@ func main() {
EasinessScore: float64(er.Rc.Metadados.IndiceFacilidade),
CompletenessScore: float64(er.Rc.Metadados.IndiceCompletude),
},
ProcInfo: er.Rc.Procinfo,
Package: s3Backup,
ProcInfo: er.Rc.Procinfo,
Package: s3Backup,
ManualCollection: manualCollection,
}
// Calculando o tempo de execução da coleta
if c.StartTime != "" {
Expand Down

0 comments on commit 14a86bd

Please sign in to comment.