Defer query to mark task as completed

pull/1/head
DustyP 6 years ago
parent 4fe8419914
commit 6bdd4a0665

@ -19,6 +19,8 @@ type Task struct {
}
func processTask(task *Task, s *discordgo.Session) {
closeQuery := "Update tasks set completed = true where id = $1"
defer Database.Exec(closeQuery, task.ID)
log.Println(fmt.Sprintf("Processing task %v", task.ID))
guild, err := s.Guild(task.GuildID)
if err != nil {

Loading…
Cancel
Save