-
Notifications
You must be signed in to change notification settings - Fork 46
Rake tasks and Resque jobs
This page documents what each rake-task and Resque-job does, and how to call them (for internal reference because I constantly forget stuff).
Live in lib/tasks
.
rake genotypes:update
Iterates over all Genotype-files, creates md5sum and stores in the database-field for that genotype
rake snpedia:update
Resets all SNPedia-entries - sets SNPedia-time-parsed for all SNPs to a point in the past, deletes SNPedia-entry
rake papers:update
Manually update Mendeley, SNPedia, PLoS-annotation for all SNPs
rake frequencies:update
Manually update allele-frequencies for all SNPs
rake newsletter:send
Used to send newsletter to all users. Maybe used once or twice. Remember to change the text of the newsletter in views/user_mail/newsletter.text.erb
.
rake snpedia:clean
Old - used to fix bug in the SNPedia parsing results with results having unnecessary "}"
rake phenotypes:update_known_phenotypes
Old - used to fix empty/unused variations in known_phenotypes-array for all phenotypes, now handled automatically
Live in app/jobs
, are called over rails console production
or from inside scripts.
Resque.enqueue(Deletegenotype, genotype_id)
Deletes all User_SNPs for the user who deleted the genotype with id genotype_id
Resque.enqueue(FitbitDump, email, fitbit_profile_id)
Writes a CSV for all Fitbit-entries for user with fitbit_profile_id
and sends a link to email
.
Resque.enqueue(FitbitEdit, fitbit_profile_id)
Updates the Fitbit-data for user with fitbit_profile_id
Resque.enqueue(FitbitEndSubscription, fitbit_profile_id)
Destroys connection between openSNP and Fitbit for user with fitbit_profile_id
and deletes the local profile
Resque.enqueue(FitbitInit, fitbit_profile_id)
Creates connection between openSNP and Fitbit, creates local user-Fitbit-profile
Resque.enqueue(FitbitNotification, fitbit_profile_id)
Not sure right now.
Resque.enqueue(Frequency, snp_id)
Updates the allele-frequency of the SNP with snp_id
.
Resque.enqueue(GenomeGov)
Fetches the newest SNP-annotation-CSV from genome.gov and updates all SNP-annotations accordingly.