Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lib/taskinator/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ def persist_workflow_state(new_state)
transaction.hmset(
self.key,
:state, new_state,
:updated_at, @updated_at
:updated_at, @updated_at.iso8601(3)
)

# also update the "root" process
transaction.hset(
process_key,
:updated_at, @updated_at
:updated_at, @updated_at.iso8601(3)
)
end
end
Expand All @@ -138,7 +138,7 @@ def fail(error=nil)
:error_type, error.class.name,
:error_message, error.message,
:error_backtrace, JSON.generate(error.backtrace || []),
:updated_at, Time.now.utc
:updated_at, Time.now.utc.iso8601(3)
)
end
end
Expand Down Expand Up @@ -182,7 +182,7 @@ def tasks_count
process_key = self.process_key
conn.multi do |transaction|
transaction.hincrby process_key, "tasks_#{status}", 1
transaction.hset process_key, :updated_at, Time.now.utc
transaction.hset process_key, :updated_at, Time.now.utc.iso8601(3)
end
end
end
Expand Down Expand Up @@ -294,7 +294,8 @@ def visit_attribute(attribute)
end

def visit_attribute_time(attribute)
visit_attribute(attribute)
value = @instance.send(attribute)
@hmset += [attribute, value.iso8601(3)] if value
end

def visit_attribute_enum(attribute, type)
Expand Down