Resolved the issue where the final deployment logs for the domain were not recorded after immediate execution.
This commit is contained in:
@@ -14,9 +14,7 @@ func create(ctx context.Context, record *models.Record) error {
|
||||
}
|
||||
|
||||
if record.GetBool("rightnow") {
|
||||
defer func() {
|
||||
setRightnow(ctx, record, false)
|
||||
}()
|
||||
|
||||
if err := deploy(ctx, record); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -46,9 +44,7 @@ func update(ctx context.Context, record *models.Record) error {
|
||||
}
|
||||
|
||||
if record.GetBool("rightnow") {
|
||||
defer func() {
|
||||
setRightnow(ctx, record, false)
|
||||
}()
|
||||
|
||||
if err := deploy(ctx, record); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ func (a *history) commit() error {
|
||||
|
||||
domainRecord.Set("lastDeployedAt", a.DeployedAt)
|
||||
domainRecord.Set("lastDeployment", record.Id)
|
||||
domainRecord.Set("rightnow", false)
|
||||
|
||||
if err := app.GetApp().Dao().SaveRecord(domainRecord); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user