Skip to content

Commit

Permalink
Merge branch '8.0.x' of https://github.com/macite/doubtfire-api into …
Browse files Browse the repository at this point in the history
…8.0.x
  • Loading branch information
macite committed May 11, 2024
2 parents ef8611f + 4bfdfb1 commit 09faa67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/models/turn_it_in/tii_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def perform
self.error_code = nil if self.retry && error?
self.custom_error_message = nil

self.log = [] if self.complete # reset log if complete... and performing again
self.log = [] if self.log.nil? || self.log.empty? || self.complete # reset log if complete... and performing again

self.log << { date: Time.zone.now, message: "Started #{type}" }
self.last_run = Time.zone.now

self.retry = false # reset retry flag
self.log = [] if self.complete # reset log if complete... and performing again
self.complete = false # reset complete flag

result = run
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20240105055902_add_tii_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def change
t.integer :error_code
t.text :custom_error_message

t.text :log, default: "[]"
t.text :params, default: "{}"
t.text :log
t.string :params, default: "{}", limit: 1024

t.timestamps

Expand Down
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@
t.boolean "retry", default: true, null: false
t.integer "error_code"
t.text "custom_error_message"
t.text "log", default: "[]"
t.text "params", default: "{}"
t.text "log"
t.string "params", limit: 1024, default: "{}"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["complete"], name: "index_tii_actions_on_complete"
Expand Down

0 comments on commit 09faa67

Please sign in to comment.