diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7047e78a..d26945eb 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,6 +19,5 @@ updates: schedule: interval: "monthly" ignore: - - dependency-name: "invenio-accounts" # see https://github.com/HEPData/hepdata/issues/816 - dependency-name: "pytest" # see https://github.com/HEPData/hepdata/issues/815 - dependency-name: "pytest-cov" # see https://github.com/HEPData/hepdata/issues/580 diff --git a/docker-compose.yml b/docker-compose.yml index 86dc4f59..3026c885 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,8 +18,7 @@ services: - "APP_CELERY_RESULT_BACKEND=redis://cache:6379/2" - "APP_OPENSEARCH_HOST=os:9200" - "APP_SECRET_KEY=CHANGE_ME" - - "APP_SESSION_TYPE=redis" - - "APP_SESSION_REDIS_URL=redis://cache:6379/1" + - "APP_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1" - "APP_SQLALCHEMY_DATABASE_URI=postgresql://hepdata:hepdata@db/hepdata" - "SAUCE_USERNAME=${SAUCE_USERNAME}" - "SAUCE_ACCESS_KEY=${SAUCE_ACCESS_KEY}" @@ -38,8 +37,7 @@ services: - "APP_CELERY_RESULT_BACKEND=redis://cache:6379/2" - "APP_OPENSEARCH_HOST=os:9200" - "APP_SECRET_KEY=CHANGE_ME" - - "APP_SESSION_TYPE=redis" - - "APP_SESSION_REDIS_URL=redis://cache:6379/1" + - "APP_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1" - "APP_SQLALCHEMY_DATABASE_URI=postgresql://hepdata:hepdata@db/hepdata" read_only: false volumes: diff --git a/hepdata/config.py b/hepdata/config.py index 3083c301..5f411529 100644 --- a/hepdata/config.py +++ b/hepdata/config.py @@ -80,6 +80,14 @@ def _(x): 'schedule': crontab(minute=0, hour=1), # execute daily at 1am UTC 'args': (1,), # INSPIRE records (with HEPData) updated yesterday }, + 'session_cleaner': { + 'task': 'invenio_accounts.tasks.clean_session_table', + 'schedule': timedelta(days=1), + }, + 'delete_login_ips': { + 'task': 'invenio_accounts.tasks.delete_ips', + 'schedule': timedelta(days=30), + }, } # Number of workers running the datacite queue @@ -110,7 +118,7 @@ def _(x): CACHE_TYPE = "redis" # Session -SESSION_REDIS = "redis://localhost:6379/0" +ACCOUNTS_SESSION_REDIS_URL = CACHE_REDIS_URL PERMANENT_SESSION_LIFETIME = timedelta(hours=12) # OpenSearch diff --git a/hepdata/config_local.docker_compose.py b/hepdata/config_local.docker_compose.py index c32e3f32..2ed8937a 100644 --- a/hepdata/config_local.docker_compose.py +++ b/hepdata/config_local.docker_compose.py @@ -10,7 +10,7 @@ CELERY_BROKER_URL = "redis://cache:6379/0" CELERY_RESULT_BACKEND = "redis://cache:6379/1" CACHE_REDIS_URL = "redis://cache:6379/0" -SESSION_REDIS = "redis://cache:6379/0" +ACCOUNTS_SESSION_REDIS_URL = CACHE_REDIS_URL TEST_DB_HOST = "db" OPENSEARCH_HOST = "os" SEARCH_HOSTS = [ diff --git a/hepdata/version.py b/hepdata/version.py index fe400e3b..c4a0bd28 100644 --- a/hepdata/version.py +++ b/hepdata/version.py @@ -28,4 +28,4 @@ and parsed by ``setup.py``. """ -__version__ = "0.9.4dev20240805" +__version__ = "0.9.4dev20240910" diff --git a/requirements.txt b/requirements.txt index 9e600441..39d660fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ beautifulsoup4==4.12.3 bleach==6.1.0 datacite==1.1.4 -gunicorn==22.0.0 +gunicorn==23.0.0 hepdata-converter-ws-client==0.2.2 hepdata-validator==0.3.5 invenio-access==2.0.0 # Indirect (needed by invenio-admin) -invenio-accounts==5.0.1 # https://github.com/HEPData/hepdata/issues/816 +invenio-accounts==5.1.1 invenio-admin==1.5.0 invenio-assets==3.0.3 invenio-config==1.0.4 @@ -14,7 +14,7 @@ invenio-logging[sentry_sdk]==2.1.1 invenio-oauthclient==4.0.0 invenio-pidstore==1.3.1 invenio-records==2.3.0 -invenio-search[opensearch2]==2.3.1 +invenio-search[opensearch2]==2.4.1 invenio-theme==3.3.0 invenio-userprofiles==3.0.0 python-twitter-v2==0.9.1