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

dependencies: update celery to version 5 #332

Merged
merged 1 commit into from
Oct 9, 2020
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: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ wand = ">=0.5.0,<0.6.0"
transifex-client = "*"
python-dotenv = "*"
flask-cors = ">3.0.8"
# Avoid an error during invenio-previewer initialization
nbconvert = ">=5.6.1,<6.0.0"

[dev-packages]
Flask-Debugtoolbar = ">=0.10.1"
Expand Down
412 changes: 219 additions & 193 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ services:
file: docker-services.yml
service: app
restart: "always"
command: ["celery worker -A invenio_app.celery --loglevel=INFO"]
command: ["celery --app invenio_app.celery worker --loglevel=INFO"]
image: sonar
links:
- cache
Expand Down
6 changes: 5 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@

[pytest]
pep8ignore = docs/conf.py ALL
addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=sonar --cov-report=term-missing --ignore=setup.py
; Add pluging for celery fixtures manually. This can be removed when invenio-celery will be on version 1.2.1
addopts = --pep8 --doctest-glob="*.rst" --doctest-modules --cov=sonar --cov-report=term-missing --ignore=setup.py -p celery.contrib.pytest
testpaths = docs tests sonar
; Not displaying all the PendingDeprecationWarnings from invenio
filterwarnings =
ignore::PendingDeprecationWarning
2 changes: 1 addition & 1 deletion scripts/server
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export FLASK_ENV=development

# Start Worker and Server
section "Start celery worker" "info"
celery worker -A invenio_app.celery -l INFO --beat --without-heartbeat & pid_celery=$!
celery --app invenio_app.celery worker --loglevel INFO --beat & pid_celery=$!
message "Done" "success"

# Start web server
Expand Down
4 changes: 4 additions & 0 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ if $import; then
message "Size of import sets is set to \"$size\"" "info"
fi

# Purge celery
section "Purge celery tasks" "info"
celery --app invenio_app.celery purge -f

# Clean redis
section "Clear redis cache" "info"
invenio shell --no-term-title -c "import redis; redis.StrictRedis.from_url(app.config['CACHE_REDIS_URL']).flushall(); print('Cache cleared')"
Expand Down