Skip to content

Commit

Permalink
fix: weird formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-swinkler committed Oct 28, 2022
1 parent d0c0a24 commit 526b852
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/resources/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (

const (
taskIDDelimiter = '|'
AllowOverlappingExecution = "allow_overlapping_execution"
)

var taskSchema = map[string]*schema.Schema{
Expand Down Expand Up @@ -473,7 +472,7 @@ func CreateTask(d *schema.ResourceData, meta interface{}) error {
builder.WithComment(v.(string))
}

if v, ok := d.GetOk(AllowOverlappingExecution); ok {
if v, ok := d.GetOk("allow_overlapping_execution"); ok {
builder.WithAllowOverlappingExecution(v.(bool))
}

Expand Down Expand Up @@ -651,9 +650,9 @@ func UpdateTask(d *schema.ResourceData, meta interface{}) error {
}
}

if d.HasChange(AllowOverlappingExecution) {
if d.HasChange("allow_overlapping_execution") {
var q string
_, new := d.GetChange(AllowOverlappingExecution)
_, new := d.GetChange("allow_overlapping_execution")
flag := new.(bool)
if flag {
q = builder.SetAllowOverlappingExecutionParameter()
Expand All @@ -662,7 +661,7 @@ func UpdateTask(d *schema.ResourceData, meta interface{}) error {
}
err := snowflake.Exec(db, q)
if err != nil {
return errors.Wrapf(err, "error updating %s on task %v", AllowOverlappingExecution, d.Id())
return errors.Wrapf(err, "error updating task %v", d.Id())
}
}

Expand Down

0 comments on commit 526b852

Please sign in to comment.