Skip to content
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

Add feature to use unused autograder runs at midnight #36

Closed
wants to merge 1 commit into from

Conversation

Ram-G
Copy link

@Ram-G Ram-G commented Feb 11, 2019

#19, #35

Adds an endpoint under staff routes. This can be triggered by a cron script from the grader VM everyday, say, at 12:00:01 AM.

TODO: Needs testing. Need to verify that datetime usage is correct (do timezones mess with this somehow?)

@redsn0w422
Copy link

@shreyas208, @Ram-G status on this?

@ayushr2 ayushr2 requested a review from shreyas208 March 12, 2019 01:25
@nmagerko
Copy link
Contributor

I'd like to close this unless there's some more work that will be done here. Thoughts?

@ayushr2
Copy link
Contributor

ayushr2 commented Mar 30, 2019

From what it looks like, this exposes a new endpoint which we will need to hit externally.
Could we instead add a thread to the On-Demand app itself which acts as a scheduler? It sleeps until the next most recent task is due. We can wake it up to add a new task and it will go back to sleep for the most recent task. That way we can even have deadline AG runs on On-Demand as well.

@nmagerko
Copy link
Contributor

I personally don't like the idea of getting the on-demand app involved in scheduling, but maybe others will find that appealing.

@bhuvy2
Copy link

bhuvy2 commented Mar 30, 2019

Don’t know if I should put this here, but timezones do mess with this because of daylight savings

@Ram-G
Copy link
Author

Ram-G commented Mar 30, 2019

The idea of having it in an external endpoint and not baked into the app was that then we could control the runs without have to restart the on-demand app. As for the feature itself, ref some discussions on slack with @redsn0w422 and @shreyas208, I think we didn't come to a conclusion whether we want this feature at all. It's a nice-to-have but it encourages students to be lazier with using their runs.

@bhuvy2 I agree, I think daylight savings would mess with it. Reading up a bit about it, it seems using UTC time would fix that. I can do that if we want to merge this feature.

@bhuvy2
Copy link

bhuvy2 commented Mar 30, 2019

I’d recommend using pytz and America/Chicago which will convert naive timezones into localized time zones. After, you can convert to UTC and schedule.

If you just use UTC to schedule, it won’t convert naive time zones to properly localized ones.

As for the scheduling questions, I wouldn’t recommend using cron because it is an anti-pattern. Any scheduling that contributes to application logic should be in the applications.

If we do go with scheduling baked into the flask app, APScheduler would be preferable (celery involves us setting up rabbitmq which is overkill)

@Xiangmingchen
Copy link
Collaborator

I'll close this since it's a very old PR and we are currently trying to incorporate APScheduler into our app and enable scheduling grading runs from on-demand. If we still want to implement this feature, we will use APScheduler instead.

@Xiangmingchen Xiangmingchen deleted the unused-runs branch November 30, 2020 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants