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

1051 backend model changes on cosmos to hold new incoming urls #1069

Open
wants to merge 57 commits into
base: dev
Choose a base branch
from

Conversation

bishwaspraveen
Copy link
Contributor

No description provided.

@bishwaspraveen bishwaspraveen linked an issue Oct 10, 2024 that may be closed by this pull request
@CarsonDavis CarsonDavis self-requested a review October 10, 2024 20:06
…new-incoming-urls

Merging dev into this branch
@bishwaspraveen bishwaspraveen linked an issue Oct 24, 2024 that may be closed by this pull request
dump_urls = DumpUrl.objects.filter(collection=collection)
curated_urls = CuratedUrl.objects.filter(collection=collection)

DeltaUrl.objects.filter(collection=collection).delete()
Copy link
Collaborator

Choose a reason for hiding this comment

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

might want this to happen at the end?

delete=False,
)
elif (
curated_url.scraped_title != dump_url.scraped_title
Copy link
Collaborator

Choose a reason for hiding this comment

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

we might need to only write the different metadata, not all of it

)


def populate_dump_urls(collection):
Copy link
Collaborator

Choose a reason for hiding this comment

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

might move this up in the file?



def populate_dump_urls(collection):
urls = Url.objects.filter(collection=collection)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is an abstract model, it should have nothing stored in it

@@ -49,7 +52,7 @@ def _get_data_to_import(collection, server_name):
continue

augmented_data = {
"model": "sde_collections.candidateurl",
"model": "sde_collections.url",
Copy link
Collaborator

Choose a reason for hiding this comment

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

bishwas tried to make this dump directly into dump url, but that didn't work. need to troubleshoot.

"candidate-urls-api/<str:config_folder>/",
view=views.CandidateURLAPIView.as_view(),
name="candidate-url-api",
"curated-urls-api/<str:config_folder>/",
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to keep the old one and add a new one alongside

@@ -307,8 +308,8 @@ def create(self, request, *args, **kwargs):
return Response(serializer.data, status=status.HTTP_201_CREATED)


class CandidateURLAPIView(ListAPIView):
serializer_class = CandidateURLAPISerializer
class CuratedURLAPIView(ListAPIView):
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep the old one and add a new one alongside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants