mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
refactor ITableSpec signature with context
This commit is contained in:
@@ -162,7 +162,7 @@ func (joint *SAlertnotification) GetExtraDetails(
|
||||
}
|
||||
|
||||
func (joint *SAlertnotification) DoSave(ctx context.Context, userCred mcclient.TokenCredential) error {
|
||||
if err := AlertNotificationManager.TableSpec().Insert(joint); err != nil {
|
||||
if err := AlertNotificationManager.TableSpec().Insert(ctx, joint); err != nil {
|
||||
return err
|
||||
}
|
||||
joint.SetModelManager(AlertNotificationManager, joint)
|
||||
|
||||
@@ -109,7 +109,7 @@ func (man *SDataSourceManager) initDefaultDataSource(ctx context.Context) error
|
||||
Url: url,
|
||||
}
|
||||
ds.Name = DefaultDataSource
|
||||
if err := man.TableSpec().Insert(ds); err != nil {
|
||||
if err := man.TableSpec().Insert(ctx, ds); err != nil {
|
||||
log.Errorf("insert default influxdb: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user