-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ingest): refactor ingest workers into seperate services
- Loading branch information
Showing
23 changed files
with
176 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
logs | ||
*.log |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
REDARC_API=http://redarc.mysite.org/api/ | ||
SERVER_NAME=redarc.mysite.org | ||
ADMIN_PASSWORD: "qwerty" | ||
INGEST_PASSWORD: "asdf" | ||
IMAGE_PATH: "/your/path" | ||
|
||
INGEST_ENABLED=true | ||
INDEX_ENABLED=true | ||
PG_DATABASE=postgres | ||
PG_USER=postgres | ||
PG_PASSWORD=test1234 | ||
PG_HOST=pgsql-dev | ||
PG_PORT=5432 | ||
PGFTS_DATABASE=postgres | ||
PGFTS_USER=postgres | ||
PGFTS_PASSWORD=test1234 | ||
PGFTS_HOST=pgsql-fts | ||
PGFTS_PORT=5432 | ||
|
||
CLIENT_ID="change me" | ||
CLIENT_SECRET="change me" | ||
PASSWORD="change me" | ||
USER_AGENT="my user agent" | ||
REDDIT_USERNAME="change me" | ||
INDEX_DELAY=300 | ||
SUBREDDITS="asdf,asdf" | ||
FETCH_DELAY=43200 | ||
DOWNLOAD_IMAGES: true | ||
REDIS_HOST: localhost | ||
REDIS_PORT: 6379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
# redarc-ingest | ||
|
||
gunicorn | ||
falcon | ||
rq | ||
dotenv | ||
praw | ||
psycogp2 | ||
### Image downloader: | ||
- Downloads images queued by the Reddit worker | ||
|
||
### Reddit worker: | ||
- Fetches threads and comments and queues images to be downloaded | ||
|
||
### Subreddit worker: | ||
- Retrieves hot/new/rising threads and queues them for Reddit worker to process periodically | ||
|
||
### Index worker: | ||
- Periodically indexes the databases |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
logs | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM alpine3.18 | ||
|
||
RUN apk update | ||
|
||
RUN apk add bash python3 py3-pip | ||
|
||
RUN mkdir -p /image_downloader | ||
WORKDIR /image_downloader | ||
COPY . . | ||
|
||
RUN pip install rq | ||
RUN pip install python-dotenv | ||
RUN pip install gallery-dl | ||
|
||
CMD ["/bin/python3", "image_downloader.py"] |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
logs | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine3.18 | ||
|
||
RUN apk update | ||
|
||
RUN apk add bash python3 py3-pip postgresql-client | ||
|
||
RUN mkdir -p /index_worker | ||
WORKDIR /index_worker | ||
COPY . . | ||
|
||
RUN pip install python-dotenv | ||
RUN pip install psycopg2-binary | ||
|
||
CMD ["/bin/python3", "index_worker.py"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
logs | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
FROM redis:7.0.12-alpine3.18 | ||
FROM alpine3.18 | ||
|
||
RUN apk update | ||
|
||
RUN apk add bash python3 py3-pip postgresql-client | ||
|
||
RUN mkdir -p /ingest | ||
WORKDIR /ingest | ||
RUN mkdir -p /reddit_worker | ||
WORKDIR /reddit_worker | ||
COPY . . | ||
|
||
RUN pip install rq | ||
RUN pip install python-dotenv | ||
RUN pip install praw | ||
RUN pip install psycopg2-binary | ||
RUN pip install gallery-dl | ||
|
||
RUN chmod +x entry.sh | ||
CMD ["/bin/bash", "entry.sh"] | ||
CMD ["/bin/python3", "reddit_worker.py"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
logs | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine3.18 | ||
|
||
RUN apk update | ||
|
||
RUN apk add bash python3 py3-pip | ||
|
||
RUN mkdir -p /subreddit_worker | ||
WORKDIR /subreddit_worker | ||
COPY . . | ||
|
||
RUN pip install rq | ||
RUN pip install python-dotenv | ||
RUN pip install praw | ||
|
||
RUN chmod +x entry.sh | ||
CMD ["/bin/python3", "subreddit_worker"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.