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

Celery task to fetch course roster asynchronously #6610

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Conversation

marcospri
Copy link
Member

@marcospri marcospri commented Aug 28, 2024

For:

A celery task that just forwards the call to the service.

Testing

Fech one roster asynchronously

from lms.tasks.course_roster import fetch_roster


fetch_roster.delay(lms_course_id=db.query(models.LMSCourse).filter(models.LMSCourse.lti_context_memberships_url.is_not(None)).first().id)

In the make dev log you'll see something like:

INFO/ForkPoolWorker-16] lms.tasks.course_roster.fetch_roster[fdac8f5e-976c-4421-806a-9781c6c45cbe] Task lms.tasks.course_roster.fetch_roster[fdac8f5e-976c-4421-806a-9781c6c45cbe] succeeded in 3.8122543759982364s: None

@marcospri marcospri marked this pull request as ready for review August 28, 2024 12:36
@marcospri marcospri force-pushed the roster-service branch 2 times, most recently from 82b3c81 to ba8e8e2 Compare August 29, 2024 09:08
Base automatically changed from roster-service to main August 29, 2024 09:15
@marcospri marcospri merged commit 2f403b7 into main Aug 29, 2024
9 checks passed
@marcospri marcospri deleted the roster-task branch August 29, 2024 11:06
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.

2 participants