Conversation
| ) | ||
|
|
||
| # Write out statistics and missing courses to an output file. | ||
| with open("./status_audit.txt", "w") as f: |
There was a problem hiding this comment.
if we want to run this on a cron, we may want to allow the file name to be passed in/to include the UNIX timestamp.
There was a problem hiding this comment.
Yup sounds good. Do you think we should write it to S3 or something like that? Maybe it'd be cool if we could setup a Slack integration and get notifs that way, but might be a lot of extra work for little reward.
|
|
||
| f.write( | ||
| """Courses Out of Sync\nCourse Code / Last Update Status / | ||
| Our Stored Status / Actual Status\n""" |
There was a problem hiding this comment.
What does actual status mean? Might be good to elaborate bc I'm getting it mixed up in my head
There was a problem hiding this comment.
Actual status is the Path@Penn (or the accurate), status of a course. I'll rename it a bit and also add a comment explaining in-line.
| stats["missing_data"] += 1 | ||
| continue | ||
|
|
||
| course_status = data.get("status") |
There was a problem hiding this comment.
is this status per section or per course?
There was a problem hiding this comment.
It should be section_status, will change.
Adding a management command that generates a text file, displaying the differences in section statuses between our database and the OpenData API endpoint
/v1/course_section_status/{term}/all.