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

Hotfix/add missing worker #711

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bb5c96e
:package: update Pillow
lifenautjoe May 5, 2020
2cbc504
Merge pull request #698 from OkunaOrg/release/0.0.66
lifenautjoe May 5, 2020
135e3f7
Revert ":package: update Pillow"
lifenautjoe May 5, 2020
9b71e28
Merge pull request #699 from OkunaOrg/hotfix/unicode-issues
lifenautjoe May 5, 2020
03495fa
:bug: jesus christ
lifenautjoe May 5, 2020
cac6ea2
Merge pull request #700 from OkunaOrg/hotfix/missing-ffmpeg
lifenautjoe May 5, 2020
a1af804
:bug: revert django storages upgrade
lifenautjoe May 5, 2020
937422f
Merge pull request #701 from OkunaOrg/hotfix/revert-storages-update
lifenautjoe May 5, 2020
6e33a4e
:bug: remove django-rq routes
lifenautjoe May 5, 2020
e29407f
Merge pull request #702 from OkunaOrg/hotfix/remove-django-rq-routes
lifenautjoe May 5, 2020
e8a002e
:bug: add missing worker for activity score
lifenautjoe May 5, 2020
74bf84d
:bug: add missing config on docker for activity scores
lifenautjoe May 5, 2020
c453135
:wrench: change docker to 3.6 image to reflect aws
uiboy May 14, 2020
a80de8f
:recycle: remove logging and extra db refresh in job
uiboy May 14, 2020
ed83402
Merge branch 'develop' into hotfix/add-missing-worker
uiboy May 14, 2020
3996ec5
:bug: fix chunked queryset import
uiboy May 15, 2020
51bd225
:bug: fix incorrect merge
uiboy May 15, 2020
f067e4c
Revert "Revert "Merge pull request #692 from OkunaOrg/feature/257-tre…
uiboy May 15, 2020
1bc360c
:card_file_box: remove migration not needed
uiboy May 15, 2020
c043e4b
:recycle: add missing import
uiboy May 15, 2020
847cfd7
:arrow_up: add missing pkg
uiboy May 21, 2020
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 .docker/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7.3
FROM python:3.6

RUN apt-get -y update && apt-get -y upgrade && apt-get install -y ffmpeg

Expand Down
4 changes: 2 additions & 2 deletions .docker/scheduler/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7.3
FROM python:3.6

RUN apt-get -y update && apt-get -y upgrade && apt-get install -y ffmpeg && apt-get install -y supervisor

Expand All @@ -21,4 +21,4 @@ RUN pip install -r requirements.txt

VOLUME ["/opt/okuna-api"]

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
14 changes: 14 additions & 0 deletions .docker/scheduler/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,18 @@ startretries = 3 ; max # of serial start failures (default 3)
exitcodes = 0, 2 ; 'expected' exit codes for process (default 0, 2)
killasgroup = true ; SIGKILL the UNIX process group (def false)
stopasgroup = true
stopsignal = QUIT

[program: rqscheduleractivityscore]
command = python manage.py rqscheduler --queue=process-activity-score
loglevel = info ; (log level;default info; others: debug, warn, trace)
numprocs = 1
directory = /opt/okuna-api
autostart = true
autorestart = unexpected
startsecs = 1 ; number of secs prog must stay running (def. 1)
startretries = 3 ; max # of serial start failures (default 3)
exitcodes = 0, 2 ; 'expected' exit codes for process (default 0, 2)
killasgroup = true ; SIGKILL the UNIX process group (def false)
stopasgroup = true
stopsignal = QUIT
4 changes: 2 additions & 2 deletions .docker/worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7.3
FROM python:3.6

RUN apt-get -y update && apt-get -y upgrade && apt-get install -y ffmpeg && apt-get install -y supervisor

Expand All @@ -21,4 +21,4 @@ RUN pip install -r /requirements.txt

VOLUME ["/opt/okuna-api"]

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
14 changes: 14 additions & 0 deletions .docker/worker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,18 @@ startretries = 3 ; max # of serial start failures (default 3)
exitcodes = 0, 2 ; 'expected' exit codes for process (default 0, 2)
killasgroup = true ; SIGKILL the UNIX process group (def false)
stopasgroup = true
stopsignal = QUIT

[program: rqworkeractivityscore]
command = python manage.py rqworker process-activity-score
loglevel = info ; (log level;default info; others: debug, warn, trace)
numprocs = 1
directory = /opt/okuna-api
autostart = true
autorestart = unexpected
startsecs = 1 ; number of secs prog must stay running (def. 1)
startretries = 3 ; max # of serial start failures (default 3)
exitcodes = 0, 2 ; 'expected' exit codes for process (default 0, 2)
killasgroup = true ; SIGKILL the UNIX process group (def false)
stopasgroup = true
stopsignal = QUIT
36 changes: 28 additions & 8 deletions .ebextensions/supervisord.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ files:
file=/opt/python/run/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; socket file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner

[supervisord]
logfile=/opt/python/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=10MB ; (max main logfile bytes b4 rotation;default 50MB)
Expand All @@ -19,13 +19,13 @@ files:
minprocs=200 ; (min. avail process descriptors;default 200)
directory=/opt/python/current/app ; (default is not to cd during start)
;nocleanup=true ; (don not clean up tempfiles at start;default false)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///opt/python/run/supervisor.sock

[program:httpd]
command=/opt/python/bin/httpdlaunch
stdout_logfile=/opt/python/log/django_stdout.log
Expand All @@ -39,8 +39,8 @@ files:
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
killasgroup=false ; SIGKILL the UNIX process group (def false)
redirect_stderr=false


[program:rqworkerdefault]
command=/bin/bash -c 'source /opt/python/current/env && source /opt/python/run/venv/bin/activate && python manage.py rqworker default'
stdout_logfile=/opt/python/log/rqworkerdefault_stdout.log
Expand All @@ -61,7 +61,7 @@ files:
stopasgroup=true
stopsignal=QUIT
redirect_stderr=false

[program:rqworkerhigh]
command=/bin/bash -c 'source /opt/python/current/env && source /opt/python/run/venv/bin/activate && python manage.py rqworker high'
stdout_logfile=/opt/python/log/rqworkerhigh_stdout.log
Expand All @@ -81,7 +81,7 @@ files:
stopasgroup=true
stopsignal=QUIT
redirect_stderr=false

[program:rqworkerlow]
command=/bin/bash -c 'source /opt/python/current/env && source /opt/python/run/venv/bin/activate && python manage.py rqworker low'
stdout_logfile=/opt/python/log/rqworkerlow_stdout.log
Expand All @@ -101,3 +101,23 @@ files:
stopasgroup=true
stopsignal=QUIT
redirect_stderr=false

[program:rqworkeractivityscore]
command=/bin/bash -c 'source /opt/python/current/env && source /opt/python/run/venv/bin/activate && python manage.py rqworker process-activity-score'
stdout_logfile=/opt/python/log/rqworkerlow_stdout.log
stderr_logfile=/opt/python/log/rqworkerlow_stderr.log
pidfile=/opt/python/run/rqworker_low
loglevel=info ; (log level;default info; others: debug,warn,trace)
user=nobody
group=nobody
numprocs=1
directory=/opt/python/current/app
autostart=true
autorestart=unexpected
startsecs=1 ; number of secs prog must stay running (def. 1)
startretries=3 ; max # of serial start failures (default 3)
exitcodes=0,2 ; 'expected' exit codes for process (default 0,2)
killasgroup=true ; SIGKILL the UNIX process group (def false)
stopasgroup=true
stopsignal=QUIT
redirect_stderr=false
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ The change log for the API server for Okuna.

## Table of contents

- [Release 0.0.66](#release-0.0.66)
- [Release 0.0.63](#release-0.0.63)
- [Release 0.0.59](#release-0.0.59)


## Release 0.0.66

- Introduce activity score in posts and communities, add jobs for the same
- Refactor trending posts and trending communities to use activity score


## Release 0.0.63

- Improve performance for linked users API
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ shutilwhich = "*"
halo = "*"
watchdog = "*"
spectra = "*"
colorlog = "*"

[pipenv]
allow_prereleases = true
Loading