Debug points

pull/664/head
Rick Carlino 2018-02-15 16:27:55 -06:00
parent 6ec7198dc1
commit a8d09cbcbd
1 changed files with 4 additions and 3 deletions

View File

@ -193,10 +193,11 @@ private
# Devices have a `last_saw_api` field to assist users with debugging.
# We update this column every time an FBOS device talks to the API.
def mark_as_seen(entity = (current_user && current_user.device))
def mark_as_seen(bot = (current_user && current_user.device))
when_farmbot_os do
entity.update_attributes(last_saw_api: Time.now,
fbos_version: fbos_version.to_s) if entity
v = fbos_version.to_s
Rollbar.info("VERSION IS: #{v}") if bot && v
bot.update_attributes(last_saw_api: Time.now, fbos_version: v) if bot
end
end
end