-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I1544 backend dependencies #1554
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to make this change otherwise the changes were not Auto-committed(As part of the SQLALchemy v2 changes)
@@ -160,8 +164,6 @@ def has_change_permission(request, obj=None): | |||
def has_delete_permission(request, obj=None): | |||
return False | |||
|
|||
admin.site.register(AcademicTerms, TermAdmin) | |||
admin.site.register(Course, CourseAdmin) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested cron and tool. All work well.
Cron runs fine and no issues detected in beta testing. |
Fixes# 1544
Changes Involved
zoneinfo
default timezone. migration from using pytz to using zoneinfo.cron.py
adopted. 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.