-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/carecon 792 add Job and CheckJobStatus into go-force #1
Conversation
ebf4524
to
1581789
Compare
force/job.go
Outdated
return nil | ||
} | ||
|
||
func (job *Job) GetByteCount() int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brauchen wir die hier noch ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wird im SCB genutzt. Weiß nicht ob wir das dort brauchen. Ansonsten kann gleich das ganze byte konstrukt aus dem Job verschwinden. Da ich hier nach eh an den SCB ran gehe kann ich das auch ganz entfernen, da es wirklich nur für den byte count genutzt wurd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bitte rausnehmen :) wird meines Wissens nur geloggt, liefert aber keinen Mehrwert
force/job.go
Outdated
} | ||
} | ||
|
||
func (job *Job) GetForceApi() *ForceApi { return job.forceApi } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mMn können die hier raus da dass die Felder sind die wir auch dem create Job mitgeben müssen und der client immer mit default initialisiert wird. Der Ersteller das Jobs hätte immer alle Infos schon da... sehe hier keinen Mehrwert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im Grunde machen die ganzen GetXyz's da keinen Sinn. Ich nehm die komplett raus
force/job.go
Outdated
} | ||
|
||
contentUrl := job.info.ContentURL | ||
if contentUrl[0:1] != `/` { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
es gibt strings.HasPrefix
was deutlich einfacher zu lesen ist :)
force/job.go
Outdated
return fmt.Errorf("unexpected StatusCode on PUT batch: %d (%s), %s", res.StatusCode, res.Status, string(errb)) | ||
} | ||
|
||
statusURI := fmt.Sprintf("/services/data/"+job.apiVersion+"/jobs/ingest/%s", job.info.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wieso nicht alles als formattierten String, sondern zusätzlich noch String-Concatenation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gute Frage, ist beim Umzug so mit rüber gekommen. Ich ändere das! 👍
force/job.go
Outdated
return nil | ||
} | ||
|
||
func (job *Job) GetByteCount() int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bitte rausnehmen :) wird meines Wissens nur geloggt, liefert aber keinen Mehrwert
- removes bytes from jobs - removes GetByteCount-function - changes function signature for ProgressReporter - changes check for prefix from check first rune to strings.HasPrefix
8229617
to
de36bcd
Compare
No description provided.