app/workers/delete_old_bets_worker.rb
# All expired bets older than this, or all disabled bets last
# updated longer ago than this, are deleted
All expired bets older than this, or all disabled bets last
updated longer ago than this, are deleted
All expired bets older than this or all disabled bets last updated longer ago than this are deleted
def old_disabled_bets
    Bet.impermanent.where(
      "expiration_date IS NULL AND ((updated_at IS NULL AND created_at <= ?) OR (updated_at IS NOT NULL AND updated_at <= ?))",
      OLD_BET_THRESHOLD.ago,
      OLD_BET_THRESHOLD.ago,
    )
  end
def old_disabled_bets Bet . impermanent . where ( "expiration_date IS NULL AND ((updated_at IS NULL AND created_at <= ?) OR (updated_at IS NOT NULL AND updated_at <= ?))" , OLD_BET_THRESHOLD . ago , OLD_BET_THRESHOLD . ago , ) end
All expired bets older than this, or all disabled bets last
updated longer ago than this, are deleted
All expired bets older than this or all disabled bets last updated longer ago than this are deleted