Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#154 Fixed indentation (website deduplication improvements)

Pesky siren tab key calling out to me as I type!
  • Loading branch information...
commit 3f4e4b75315392fffdd634696eb65b55a1112d03 1 parent b1898cc
@Alex-Ikanow Alex-Ikanow authored
Showing with 17 additions and 17 deletions.
  1. +17 −17 app/models/agents/website_agent.rb
View
34 app/models/agents/website_agent.rb
@@ -79,18 +79,18 @@ def validate_options
end
# Check integer variables:
if options['expected_update_period_in_days'].present?
- begin
- Integer(options['expected_update_period_in_days'])
- rescue
- errors.add(:base, "Invalid expected_update_period_in_days format")
- end
- end
+ begin
+ Integer(options['expected_update_period_in_days'])
+ rescue
+ errors.add(:base, "Invalid expected_update_period_in_days format")
+ end
+ end
if options['uniqueness_look_back'].present?
- begin
- Integer(options['uniqueness_look_back'])
- rescue
- errors.add(:base, "Invalid uniqueness_look_back format")
- end
+ begin
+ Integer(options['uniqueness_look_back'])
+ rescue
+ errors.add(:base, "Invalid uniqueness_look_back format")
+ end
end
end
@@ -185,13 +185,13 @@ def store_payload?(old_events, result)
def previous_payloads(num_events)
if options['uniqueness_look_back'].present?
- look_back = options['uniqueness_look_back'].to_i
+ look_back = options['uniqueness_look_back'].to_i
else
- # Larger of UNIQUENESS_FACTOR*num_events and UNIQUENESS_LOOK_BACK
- look_back = UNIQUENESS_FACTOR*num_events
- if look_back < UNIQUENESS_LOOK_BACK
- look_back = UNIQUENESS_LOOK_BACK
- end
+ # Larger of UNIQUENESS_FACTOR*num_events and UNIQUENESS_LOOK_BACK
+ look_back = UNIQUENESS_FACTOR*num_events
+ if look_back < UNIQUENESS_LOOK_BACK
+ look_back = UNIQUENESS_LOOK_BACK
+ end
end
events.order("id desc").limit(look_back) if options['mode'].to_s == "on_change"
end
Please sign in to comment.
Something went wrong with that request. Please try again.