Skip to content

Instantly share code, notes, and snippets.

View jcreed's full-sized avatar

Jeff Reed jcreed

  • Liaison International
  • Amherst NY
  • X @jcreed63
View GitHub Profile
@jcreed
jcreed / next run at
Created September 14, 2022 15:12
concept run_at
class ScheduleNextRunAt
MONTHS = { "30" => [1,3,4,5,6,7,8,9,10,11,12], "31" => [1,3,5,7,8,10,12] }.freeze
def initialize(date, schedule_option, advance_to_date=nil)
@date = date
@schedule_option = schedule_option
@advance_to_date = advance_to_date
end
def next_run_date
@jcreed
jcreed / gender fix
Created April 29, 2022 12:50
aamc staging
namespace :releases do
namespace 'one_offs' do
desc 'fix-genders - CASPA22: Delete test applicants from WebAdMIT - CASPA Test Organization'
task 'fix-genders': :environment do |task|
include ReleaseTaskHelpers
display :notice, task.full_comment
unless if Rails.configuration.is_aamc
GENDERS = ["MAN", "WOMAN", "OTHER"]
@jcreed
jcreed / On branch gold-regular-prelaunch-fix
Created March 3, 2022 19:35
prelaunch eco create attempt
jreed@Jeff-Reeds-MacBook-Pro wa-devenv % monster recycle --postgres-version=postgres:13.2 --cas-tag=develop --etl-tag=master --wa-field-manager-tag=master --wa-tag=release-v2022.002.000 --expire=8 --cas-reflector-tag=master --snapshot-id=gold-regular-prelaunch --namespace=cf-demo-prelaunch [email protected] --model=all
Updates are available for some Cloud SDK components. To install them,
please run:
$ gcloud components update
Updated property [compute/zone].
Updated property [core/project].
Fetching cluster endpoint and auth data.
kubeconfig entry generated for demo.
@jcreed
jcreed / Program 269010 json
Created October 25, 2021 15:52
WA-6555 Config Sync duplicated questions
http://ws.liaisoncas.com:8081/configurationservices/v1/wa/getsupplementalsectionquestionsdetailbyprogramId/269010
{"id":777082,"createdDate":"2021-07-31","sectionName":"Questions","updatedDate":"2021-07-31","instructions":"<p><b> The questions on this page are being asked by The University of Scranton. <br/></b></p><p><b><br/></b></p>","isChildPresent":true,"admissionUserEditable":false,"formSubSectionId":null,"displayName":null,"questionGroups":null,"kiraAssessmentConfig":null,"errorResponseDTO":null,"questionSet":[{"id":320867,"createdDate":"2021-07-31","sequenceNumber":1,"title":"General","updatedDate":"2021-07-31","locked":true,"questions":[{"id":1534975,"createdDate":"2021-07-31","questionText":"Student status","questionTypeId":9,"responseTypeId":4,"displayTypeId":2,"sequenceNumber":1,"updatedDate":"2021-07-31","uniqueIdentifier":1121216524364113093,"shortFieldName":null,"answers":[{"id":17741091,"answerOption":"Full-time","createdDate":"2021-07-31","sequenceNum":1,"updatedDate":"2021-07-31","exportCod
[2021-10-12 01:53:05]: INFO (#5979): [2275] Zip file upload benchmark: 0.092000 0.052000 0.144000 ( 0.636955)
[2021-10-12 01:53:05]: INFO (#5979): [2275] Batch job info: {:error_count=>0, :file_count=>132, :max_applicants=>1000, :pdf_count=>132, :list_size=>132}
[2021-10-12 01:53:05]: INFO (#5979): [2275] Batch creation benchmark: 36.460000 1.220000 37.680000 ( 99.871167)
[2021-10-12 01:53:05]: ANY (#5979): after_perform in PdfManager::TemplateJob; args: ["6c6217727b48f182cd9b5d1f08722769", {"callback"=>nil, "batch_id"=>1779, "user_identity_id"=>12448, "time_stamp"=>"2021-10-12T01:51:21-04:00"}]; RSS: 381.52 MB
A, [2021-10-12T02:00:21.431594 #5994] ANY -- : before_perform in Webhook::AamcApiReportWorker; args: []; RSS: 291.28 MB
A, [2021-10-12T02:00:21.500918 #5994] ANY -- : after_perform in Webhook::AamcApiReportWorker; args: []; RSS: 294.75 MB
A, [2021-10-12T02:00:21.541420 #5997] ANY -- : before_perform in Webhook::AamcDecisionEtlWorker; args: []; RSS: 291.28 MB
W, [2021-10-12T02:00
[2021-10-13 07:02:39]: INFO (#10083): [2275] Zip file upload benchmark: 0.088000 0.052000 0.140000 ( 0.666201)
[2021-10-13 07:02:39]: INFO (#10083): [2275] Batch job info: {:error_count=>0, :file_count=>132, :max_applicants=>1000, :pdf_count=>132, :list_size=>132}
[2021-10-13 07:02:39]: INFO (#10083): [2275] Batch creation benchmark: 36.900000 1.124000 38.024000 (100.517159)
[2021-10-13 07:02:39]: ANY (#10083): after_perform in PdfManager::TemplateJob; args: ["84d62c63d0fe1e6f1c39dab844585a6c", {"callback"=>nil, "batch_id"=>1779, "user_identity_id"=>12448, "time_stamp"=>"2021-10-13T07:00:56-04:00"}]; RSS: 392.99 MB
A, [2021-10-13T07:09:50.213890 #10098] ANY -- : before_perform in PdfManager::TemplateJob; args: ["e2c62124cbec25440cfb620591e757e0", {"callback"=>nil, "batch_id"=>1751, "user_identity_id"=>12448, "time_stamp"=>"2021-10-13T07:09:46-04:00"}]; RSS: 299.7 MB
[2021-10-13 07:09:50]: INFO (#10098): [2301] Beginning batch download
[2021-10-13 07:09:52]: INFO (#10098): [2301] 141 appl
@jcreed
jcreed / User id 587910
Created October 1, 2021 13:50
User List Issue
email: "[email protected]"
Identity id 587910
Eco Data from 9/29/21
owns 21 lists
list names
["CND applicants received", "CND manual", "Completed Applicants", "Deferred - Next CAS Cycle", "Final Grad Admit", "GRA9 all CND Applicants", "GRAD9 CND Applicants Spring 2021 Complete", "GRAD9 CND Applicants Summer 2021 complete", "GRAD9 CND Fall 2021", "Grad Office Admit-GINT", "PDF_SIS_Daily21", "PDF_SIS_Date_Range", "Program/Term Change", "Received Applicants", "Return to Department", "Start Term equals Spring", "UGS ONLY Behavioral Conduct Committee List", "UGS ONLY Recommend For Admission", "UGS Recommend For Admission", "UGS Recommend last changed on update before running CONDUCT LIST", "UGS any Behavioral Questions = YES"]
list created dates
@jcreed
jcreed / Worker idea
Created September 17, 2021 14:59
Auto Program Sync
class ProgramScopeSyncJob
extend Resque::FailureRetry
include Resque::Plugins::UniqueJob
@queue = :low
def self.perform(id)
new(id).sync_program
end
@jcreed
jcreed / output from pod on task
Created September 15, 2021 19:37
NF-54714 Lookup task cleanup pod logs
** Invoke releases:one_offs:NF-54714 (first_time)
** Invoke environment
** Execute releases:one_offs:NF-54714
==> NF-54714: Clean Up Duplicate Language and Subject Lookups
==> Course, GpaBySubject and GpaTemplatesSubject mapped to proper subject and duplicate subject records deleted
==> Course, GpaBySubject and GpaTemplatesSubject mapped to proper subject and duplicate subject records deleted
==> Course, GpaBySubject and GpaTemplatesSubject mapped to proper subject and duplicate subject records deleted
==> Course, GpaBySubject and GpaTemplatesSubject mapped to proper subject and duplicate subject records deleted
==> Course, GpaBySubject and GpaTemplatesSubject mapped to proper subject and duplicate subject records deleted
==> Course, GpaBySubject and GpaTemplatesSubject mapped to proper subject and duplicate subject records deleted
@jcreed
jcreed / Summary of duplicate languages created on 9-13-21
Created September 13, 2021 16:01
fall 2021 lookups language duplicats
##Looks like 3 copies of each there are none where more than 3 were created
##Language dups - 2909
Language.select("association_id, identifier").where("created_at >= '2021-09-13'").having("count(*)>2").group(:association_id, :identifier)
{[674, "12772"]=>3, [425, "12776"]=>3, [672, "12772"]=>3, [406, "12766"]=>3, [609, "12773"]=>3, [618, "12776"]=>3, [406, "12769"]=>3, [575, "12771"]=>3, [635, "12770"]=>3, [668, "12776"]=>3, [655, "12772"]=>3, [468, "12771"]=>3, [566, "12771"]=>3, [582, "12774"]=>3, [615, "12767"]=>3, [464, "12766"]=>3, [690, "12773"]=>3, [493, "12770"]=>3, [495, "12776"]=>3, [693, "12775"]=>3, [464, "12769"]=>3, [429, "12773"]=>3, [679, "12770"]=>3, [622, "12775"]=>3, [439, "12777"]=>3, [486, "12768"]=>3, [654, "12770"]=>3, [694, "12773"]=>3, [477, "12766"]=>3, [576, "12770"]=>3, [582, "12778"]=>3, [620, "12768"]=>3, [578, "12771"]=>3, [438, "12777"]=>3, [571, "12775"]=>3, [477, "12769"]=>3, [675, "12777"]=>3, [428, "12772"]=>3, [669, "12777"]=>3, [686, "12772"]=>3, [625, "12770"]=>3, [656