<commit_before>desc "Deploy via git to ec2 staging"
task :deploy do
  # First, the main server.
  todo = []
  todo << 'cd /web/document-cloud'
  todo << 'rake staging crowd:server:stop'
  todo << 'if [ -d public/assets ]; then rm -r public/assets; fi'
  todo << 'git pull'
  todo << 'su - www-data -c "cd /web/document-cloud && vendor/gems/jammit-0.1.0/bin/jammit -u http://staging.cloud.org"'
  todo << 'rake staging db:migrate crowd:server:start app:restart'
  system "ssh -t -i /Users/jashkenas/Desktop/id-documentcloud-staging root@172.16.58.3 '#{todo.join(' && ')}'"

  # Then the CloudCrowd worker server.
  # todo = []
  #   todo << 'cd /web/document-cloud'
  #   todo << 'sleep 2' # Wait for the CloudCrowd server to wake up.
  #   todo << 'rake staging crowd:node:stop'
  #   todo << 'git pull'
  #   todo << 'rake staging crowd:node:start'
  #   system "ssh -t -i /Users/jashkenas/Desktop/id-documentcloud-staging root@192.168.127.12 '#{todo.join(' && ')}'"
end<commit_msg>the chown on the deploy.rake was mucking up the mtimes<commit_after>desc "Deploy via git to ec2 staging"
task :deploy do
  # First, the main server.
  todo = []
  todo << 'cd /web/document-cloud'
  todo << 'rake staging crowd:server:stop'
  todo << 'if [ -d public/assets ]; then rm -r public/assets; fi'
  todo << 'git pull'
  todo << 'su www-data -c "vendor/gems/jammit-0.1.0/bin/jammit -u http://staging.cloud.org"'
  todo << 'rake staging db:migrate crowd:server:start app:restart'
  system "ssh -t -i /Users/jashkenas/Desktop/id-documentcloud-staging root@172.16.58.3 '#{todo.join(' && ')}'"

  # Then the CloudCrowd worker server.
  # todo = []
  #   todo << 'cd /web/document-cloud'
  #   todo << 'sleep 2' # Wait for the CloudCrowd server to wake up.
  #   todo << 'rake staging crowd:node:stop'
  #   todo << 'git pull'
  #   todo << 'rake staging crowd:node:start'
  #   system "ssh -t -i /Users/jashkenas/Desktop/id-documentcloud-staging root@192.168.127.12 '#{todo.join(' && ')}'"
end
{'fraction_non_alphanumeric': 0.16826680141485598, 'fraction_numerical': 0.02425467407781708, 'mean_word_length': 3.295010845986985, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 4, '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': '5356697', 'n_tokens_mistral': 775, 'n_tokens_neox': 745, 'n_words': 196}