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

[WIP] feeds merge workflow #819

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
8 changes: 8 additions & 0 deletions apps/merge-media-sources/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions apps/merge-media-sources/.idea/merge-media-sources.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions apps/merge-media-sources/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions apps/merge-media-sources/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions apps/merge-media-sources/.idea/sqlDataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions apps/merge-media-sources/.idea/sqldialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions apps/merge-media-sources/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions apps/merge-media-sources/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Identify duplicate feeds or media sources and merge them into one entry, updating
# the feed and media source references to point to the new entry.
#

FROM gcr.io/mcback/common:latest

# Copy sources
COPY src/ /opt/mediacloud/src/merge-media-sources/
ENV PERL5LIB="/opt/mediacloud/src/merge-media-sources/perl:${PERL5LIB}" \
PYTHONPATH="/opt/mediacloud/src/merge-media-sources/python:${PYTHONPATH}"

# Copy worker scripts
COPY bin /opt/mediacloud/bin

USER mediacloud

# Set a failing CMD because we'll be using the same image to run feeds merge + media merge,
# so the user is expected to set "command" in docker-compose.yml to run a specific worker.

CMD ["SET_CONTAINER_COMMAND_TO_ONE_OF_THE_WORKERS"]
11 changes: 11 additions & 0 deletions apps/merge-media-sources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Merging media sources

## TODO

* Create sample database with fake data
* Test running the same activity multiple times
* If an activity throws an exception, its message should get printed out to the console as well (in addition to
Temporal's log)
* Track failed workflows / activities in Munin
* Instead (in addition to) of setting `workflow_run_timeout` in `test_workflow.py`, limit retries of the individual
activities too so that when they fail, we'd get a nice error message printed to the test log
Loading