parent
451f741f5a
commit
6ea4d4700c
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,12 @@ type Config struct {
|
||||||
Once bool
|
Once bool
|
||||||
Brokers struct {
|
Brokers struct {
|
||||||
NTG struct {
|
NTG struct {
|
||||||
JobInfo bool
|
JobInfo bool
|
||||||
Mock bool
|
Mock bool
|
||||||
LoadPageURIFormat string
|
LoadPageURIFormat string
|
||||||
Username string
|
LoadPageAPIURIFormat string
|
||||||
Password string
|
Username string
|
||||||
|
Password string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue