whoops dont reuse not same uri

master v0.2.1
bel 2022-01-18 06:40:55 -07:00
parent 451f741f5a
commit 6ea4d4700c
3 changed files with 8 additions and 6 deletions

View File

@ -109,7 +109,7 @@ func (ntgJob *ntgVisionJob) JobInfo() (ntgVisionJobInfo, error) {
func (ntg NTGVision) searchJob(id int64) (io.ReadCloser, error) { func (ntg NTGVision) searchJob(id int64) (io.ReadCloser, error) {
time.Sleep(config.Get().Interval.JobInfo.Get()) time.Sleep(config.Get().Interval.JobInfo.Get())
request, err := http.NewRequest(http.MethodGet, fmt.Sprintf(config.Get().Brokers.NTG.LoadPageURIFormat, id), nil) request, err := http.NewRequest(http.MethodGet, fmt.Sprintf(config.Get().Brokers.NTG.LoadPageAPIURIFormat, id), nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -75,6 +75,7 @@
"JobInfo": true, "JobInfo": true,
"Mock": true, "Mock": true,
"LoadPageURIFormat": "https://ntgvision.com/LoadDetails?loadId=%d", "LoadPageURIFormat": "https://ntgvision.com/LoadDetails?loadId=%d",
"LoadPageAPIURIFormat": "https://ntgvision.com/api/v1/load/LoadDetails?loadId==%d",
"Username": "noeasyrunstrucking@gmail.com", "Username": "noeasyrunstrucking@gmail.com",
"Password": "thumper1234" "Password": "thumper1234"
} }

View File

@ -68,6 +68,7 @@ type Config struct {
JobInfo bool JobInfo bool
Mock bool Mock bool
LoadPageURIFormat string LoadPageURIFormat string
LoadPageAPIURIFormat string
Username string Username string
Password string Password string
} }