refactored some functions, added demo download retry

This commit is contained in:
2021-10-09 19:10:38 +02:00
parent 15b273f052
commit e938b05f52
13 changed files with 242 additions and 322 deletions

View File

@@ -146,20 +146,6 @@ func (mu *MatchUpdate) AddMaxRounds(i int) *MatchUpdate {
return mu
}
// SetDemoExpired sets the "demo_expired" field.
func (mu *MatchUpdate) SetDemoExpired(b bool) *MatchUpdate {
mu.mutation.SetDemoExpired(b)
return mu
}
// SetNillableDemoExpired sets the "demo_expired" field if the given value is not nil.
func (mu *MatchUpdate) SetNillableDemoExpired(b *bool) *MatchUpdate {
if b != nil {
mu.SetDemoExpired(*b)
}
return mu
}
// SetDemoParsed sets the "demo_parsed" field.
func (mu *MatchUpdate) SetDemoParsed(b bool) *MatchUpdate {
mu.mutation.SetDemoParsed(b)
@@ -465,13 +451,6 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
Column: match.FieldMaxRounds,
})
}
if value, ok := mu.mutation.DemoExpired(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeBool,
Value: value,
Column: match.FieldDemoExpired,
})
}
if value, ok := mu.mutation.DemoParsed(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeBool,
@@ -736,20 +715,6 @@ func (muo *MatchUpdateOne) AddMaxRounds(i int) *MatchUpdateOne {
return muo
}
// SetDemoExpired sets the "demo_expired" field.
func (muo *MatchUpdateOne) SetDemoExpired(b bool) *MatchUpdateOne {
muo.mutation.SetDemoExpired(b)
return muo
}
// SetNillableDemoExpired sets the "demo_expired" field if the given value is not nil.
func (muo *MatchUpdateOne) SetNillableDemoExpired(b *bool) *MatchUpdateOne {
if b != nil {
muo.SetDemoExpired(*b)
}
return muo
}
// SetDemoParsed sets the "demo_parsed" field.
func (muo *MatchUpdateOne) SetDemoParsed(b bool) *MatchUpdateOne {
muo.mutation.SetDemoParsed(b)
@@ -1079,13 +1044,6 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
Column: match.FieldMaxRounds,
})
}
if value, ok := muo.mutation.DemoExpired(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeBool,
Value: value,
Column: match.FieldDemoExpired,
})
}
if value, ok := muo.mutation.DemoParsed(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeBool,