I1544 backend dependencies#1554
Conversation
| df = pd.DataFrame(result.fetchall(), columns=result.keys()) | ||
| df = df.drop_duplicates(keep='first') | ||
| df.to_sql(con=engine, name='submission', if_exists='append', index=False) | ||
|
|
There was a problem hiding this comment.
Split up the Submission into 2 since new postgres driver did not supported 2 queries in one. I have details on this in the PR description
| def execute_db_query(query: str, params: List = None) -> ResultProxy: | ||
| with engine.connect() as connection: | ||
| def execute_db_query(query: str, params: Dict = None) -> ResultProxy: | ||
| with engine.begin() as connection: |
There was a problem hiding this comment.
I have to make this change otherwise the changes were not Auto-committed(As part of the SQLALchemy v2 changes)
|
|
||
| admin.site.register(AcademicTerms, TermAdmin) | ||
| admin.site.register(Course, CourseAdmin) | ||
|
|
There was a problem hiding this comment.
All these change are part of prior Django 3.x version, and Django-upgrade lib made these changes.
c4e8d61 to
ae59a2c
Compare
|
build was successful (after changing the is_superuser setting which was blocking me initially), and the cron job ran successfully for both courses I was testing in beta |
ae59a2c to
c74f4e3
Compare
|
@zqian I have resolved the issues you commented on in the PR |
zqian
left a comment
There was a problem hiding this comment.
Tested cron and tool. All work well.
|
Cron runs fine and no issues detected in beta testing. |
Fixes# 1544
Changes Involved
zoneinfodefault timezone. migration from using pytz to using zoneinfo.cron.pyadopted. So need to split the submission query into two.all_assign_sub.date_last_updated.So It took about 9min to run about 56 courses.