<commit_before>import r from '../../db/connect'

function truncateDBTables() {
  this.timeout(30000)  // for some reason, truncating tables can sometimes take a long time
  return r.tableList()
    .then(tables => tables.filter(t => !t.startsWith('_')))
    .then(tablesToTruncate => Promise.all(tablesToTruncate.map(t => r.table(t).delete().run())))
    .then(() => {
      this.timeout(2000)  // reset to default timeout
    })
}
<commit_msg>still seeing failures in production -- leaving timeout at 30s<commit_after>import r from '../../db/connect'

function truncateDBTables() {
  this.timeout(30000)  // for some reason, truncating tables can sometimes take a long time
  return r.tableList()
    .then(tables => tables.filter(t => !t.startsWith('_')))
    .then(tablesToTruncate => Promise.all(tablesToTruncate.map(t => r.table(t).delete().run())))
    .then(() => {
      // this.timeout(2000)  // reset to default timeout
    })
}

{'fraction_non_alphanumeric': 0.16826411075612355, 'fraction_numerical': 0.021299254526091587, 'mean_word_length': 3.5410628019323673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2597195', 'n_tokens_mistral': 311, 'n_tokens_neox': 299, 'n_words': 72}