Skip to content

Conversation

@shanbady
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/4579

Description (What does it do?)

Makes it so that when we fetch from mitx we dont pull in courses that are unpublished

How can this be tested?

  1. checkout this branch
  2. make sure the changes in this branch are picked up by celery (restart the celery container)
  3. run ./manage.py backpopulate_mitxonline_data
  4. it should show that it pulled in ~84 resources as opposed to main which pulls in ~99.

@shanbady shanbady marked this pull request as ready for review June 17, 2024 17:47
@shanbady shanbady added the Needs Review An open Pull Request that is ready for review label Jun 17, 2024
@shanbady shanbady changed the title Shanbady/mitx ingest published courses mitx - only ingest published courses Jun 17, 2024
@rhysyngsun rhysyngsun self-assigned this Jun 17, 2024
Copy link
Contributor

@rhysyngsun rhysyngsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach works for things going forward, but it doesn't address:

  • Removing the currently non-live courses from MIT Open (arguably we could run a one-off script for this)
  • In the future should a course be accidentally published and then unpublished

So it's probably a more reliable approach to instead add live and page.live to the computation of published in _transform_course.

@rhysyngsun rhysyngsun added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Jun 17, 2024
@pdpinch
Copy link
Member

pdpinch commented Jun 18, 2024

@shanbady can you give me a high-level description of what the criteria are for including courses here?

cc @collinpreston

@shanbady
Copy link
Contributor Author

@pdpinch at a high level we are including all courses that are published. On mitx that means we have to set "live=true" and "page_live=true" otherwise we would pull down courses that appear published but should not be.

@shanbady shanbady requested a review from rhysyngsun June 18, 2024 16:27
@shanbady shanbady added Needs Review An open Pull Request that is ready for review and removed Waiting on author labels Jun 18, 2024
Copy link
Contributor

@rhysyngsun rhysyngsun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhysyngsun rhysyngsun added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Jun 18, 2024
@shanbady shanbady merged commit f0616c6 into main Jun 18, 2024
@shanbady shanbady deleted the shanbady/mitx-ingest-published-courses branch June 18, 2024 20:37
This was referenced Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants