<commit_before>env_vars = File.read("/etc/environment.d/nanobox")
execute "run cleanup" do
  command '/var/nanobox/engines/cleanup'
  cwd '/data'
  environment env_vars
  path GOPAGODA_PATH
  user 'gopagoda'
  stream true
  on_data {|data| logvac.print data}
end
<commit_msg>Cache the pkgin downloads, cleaning them out of the deploy<commit_after>env_vars = File.read("/etc/environment.d/nanobox")

execute "run cleanup" do
  command '/var/nanobox/engines/cleanup'
  cwd '/data'
  environment env_vars
  path GOPAGODA_PATH
  user 'gopagoda'
  stream true
  on_data {|data| logvac.print data}
end

execute "Cache downloads" do
  command 'mv /data/var/db/pkgin/. /var/nanobox/cache/'
  environment env_vars
  path GOPAGODA_PATH
  user 'gopagoda'
  stream true
  on_data {|data| logvac.print data}
end

{'fraction_non_alphanumeric': 0.10513141426783479, 'fraction_numerical': 0.0, 'mean_word_length': 4.194805194805195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6586639', 'n_tokens_mistral': 301, 'n_tokens_neox': 286, 'n_words': 76}