Method: Ayadn::Databases.clear_index
- Defined in:
- lib/ayadn/databases.rb
.clear_index ⇒ Object
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/ayadn/databases.rb', line 463 def self.clear_index crashes = 0 begin @sql.execute("DELETE FROM TLIndex") rescue Amalgalite::SQLite3::Error => e if crashes < 2 crashes += 1 sleep(0.01) retry else puts "ERROR in Databases" puts caller puts e puts ['clear_index'].inspect exit end end end |