Touchups in job.go

This commit is contained in:
InsanePrawn 2018-11-21 03:27:39 +01:00
parent 7de3c0a09a
commit dd11fc96db

View File

@ -39,7 +39,7 @@ type Type string
const ( const (
TypeInternal Type = "internal" TypeInternal Type = "internal"
TypeSnap = "snap" TypeSnap Type = "snap"
TypePush Type = "push" TypePush Type = "push"
TypeSink Type = "sink" TypeSink Type = "sink"
TypePull Type = "pull" TypePull Type = "pull"
@ -86,7 +86,9 @@ func (s *Status) UnmarshalJSON(in []byte) (err error) {
} }
switch s.Type { switch s.Type {
case TypeSnap: case TypeSnap:
fallthrough var st SnapJobStatus
err = json.Unmarshal(jobJSON, &st)
s.JobSpecific = &st
case TypePull: fallthrough case TypePull: fallthrough
case TypePush: case TypePush:
var st ActiveSideStatus var st ActiveSideStatus