Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created January 4, 2011 17:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashaw/765060 to your computer and use it in GitHub Desktop.
Save ashaw/765060 to your computer and use it in GitHub Desktop.
def import(stat, &blk)
puts "trying #{stat}"
begin
block_given? ? blk.call : Object.const_get(stat).import(@date)
rescue GatticaError => exception
puts "*** got a GA error: #{exception} ***"
sleep 10
retry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment