Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Update import path for media types #125

Merged
merged 2 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ingestion_server/ingestion_server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from urllib.parse import urlparse
from multiprocessing import Value, Process

from ingestion_server.constants import MEDIA_TYPES
from ingestion_server.constants.media_types import MEDIA_TYPES
import ingestion_server.indexer as indexer
from ingestion_server.state import worker_finished, clear_state
from ingestion_server.tasks import TaskTracker, Task, TaskTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import boto3
import socket

from ingestion_server.constants import MEDIA_TYPES
from ingestion_server.constants.media_types import MEDIA_TYPES
from ingestion_server.state import register_indexing_job

client = boto3.client('ec2', region_name=os.getenv('AWS_REGION', 'us-east-1'))
Expand Down
5 changes: 3 additions & 2 deletions ingestion_server/ingestion_server/indexer_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from multiprocessing import Value, Process
from psycopg2.sql import SQL

from ingestion_server.constants import MEDIA_TYPES
from ingestion_server.constants.media_types import MEDIA_TYPES
from ingestion_server.indexer import elasticsearch_connect, TableIndexer


Expand Down Expand Up @@ -59,7 +59,8 @@ def _execute_indexing_task(target_index, start_id, end_id, notify_url):
table_name=table_name
)
exists_in_mature_table = exists_in_table.format(
table=f'api_mature{table_name}', name='mature'
table=f'api_mature{table_name}', name='mature',
table_name=table_name,
)

query = SQL(f'''
Expand Down