Skip to content

Instantly share code, notes, and snippets.

@kstevens715
Last active March 22, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kstevens715/b130fc7dcc3f6753c7b791c938b26c2f to your computer and use it in GitHub Desktop.
Save kstevens715/b130fc7dcc3f6753c7b791c938b26c2f to your computer and use it in GitHub Desktop.

On ETL K8:

failures = Resque::Failure.all(0, Resque::Failure.count).map { |f| f["payload"]["args"][0].gsub("applicant/", "").split("/") }.reject { |j| j[0] =~ /gpa/ }
file = File.open('/tmp/applicants.txt', 'w')
failures.each { |failure| file.write("#{failure[0]},#{failure[1]}\n") }

On local host

kubectl cp wa-etl-resque-web-386939940-dp406:/tmp/applicants.txt applicants.txt
scp applicants.txt wa-current@wa-util-p0:/home/wa-current/current/applicants.txt

On WebadMIT util:

require 'cas3/cas_3_onebutton_etl'
csv = CSV.read("applicants.txt")
csv.each { |row| Admin::Cas3OnebuttonEtl.etl!(row[1], row[0]) }; nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment