-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathtest.cfg
More file actions
130 lines (103 loc) · 4.77 KB
/
Copy pathtest.cfg
File metadata and controls
130 lines (103 loc) · 4.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
from datetime import datetime # for premium phase-in
ELASTICSEARCH_HOSTS = [{'host': 'localhost', 'port': 9200}]
INDEX_PER_TYPE_SUBSTITUTE = '_doc'
APP_MACHINES_INTERNAL_IPS = ["localhost:5050"]
# The app is served via nginx / cloudflare - they handle SSL
SSL = False
DEBUG = True
PROXIED = True
NO_QUERY = ['account', 'journal', 'article', 'editor_group', 'suggestion', 'upload', 'provenance']
# Prevent sending emails containing each exception (a portality feature)
SUPPRESS_ERROR_EMAILS = True
# When running the app directly, and e.g. in scripts (gunicorn has its own port config)
PORT = 5004
READ_ONLY_MODE=False
SCRIPTS_READ_ONLY_MODE=False
# Appdata directory
DATA_ROOT="/home/cloo/appdata/doaj/"
UPLOAD_DIR=DATA_ROOT + "upload"
FAILED_ARTICLE_DIR=DATA_ROOT + "failed_articles"
CACHE_DIR=DATA_ROOT + "cache"
ARTICLE_HISTORY_DIR=DATA_ROOT + "history/article"
JOURNAL_HISTORY_DIR=DATA_ROOT + "history/journal"
# Anonymous data exports to local disk
STORE_IMPL = "portality.store.StoreLocal"
STORE_LOCAL_EXPOSE = True
#STORE_IMPL = "portality.store.StoreS3"
STORE_LOCAL_DIR = DATA_ROOT + "local_store/main"
STORE_TMP_DIR = DATA_ROOT + "local_store/tmp"
ELASTIC_SEARCH_SNAPSHOT_REPOSITORY = 'doaj-test-es-backups'
# Crontab for never running a job - February 31st
CRON_NEVER = {"month": "2", "day": "31", "day_of_week": "*", "hour": "*", "minute": "*"}
# Reduce test server index size via index settings (no replicas) - smaller indexes.
DEFAULT_INDEX_SETTINGS = \
{
'number_of_shards': 1,
'number_of_replicas': 0,
'analysis': {
'analyzer': {
'ascii_folded': {
'tokenizer': 'standard',
'filter': ['lowercase', 'asciifolding']
}
}
}
}
# Apply compression only to the article index (the largest), to keep setup fast for other indexes
INDEX_SETTINGS_OVERRIDES = {
'article': {'codec': 'best_compression'}
}
# The test server runs fewer huey tasks
HUEY_SCHEDULE = {
"sitemap": {"month": "*", "day": "*", "day_of_week": "*", "hour": "8", "minute": "0"},
"reporting": CRON_NEVER,
"journal_csv": {"month": "*", "day": "*", "day_of_week": "*", "hour": "*", "minute": "35"},
"read_news": {"month": "*", "day": "*", "day_of_week": "*", "hour": "*", "minute": "30"},
"article_cleanup_sync": CRON_NEVER,
"async_workflow_notifications": CRON_NEVER,
"request_es_backup": CRON_NEVER,
"check_latest_es_backup": CRON_NEVER,
"prune_es_backups": CRON_NEVER,
"public_data_dump": {"month": "*", "day": "*", "day_of_week": "*", "hour": "1", "minute": "0"},
"harvest": {"month": "*", "day": "*", "day_of_week": "*", "hour": "5", "minute": "30"},
"anon_export": CRON_NEVER,
"old_data_cleanup": {"month": "*", "day": "*", "day_of_week": "3", "hour": "12", "minute": "0"},
"monitor_bgjobs": {"month": "*", "day": "*/6", "day_of_week": "*", "hour": "10", "minute": "0"},
"find_discontinued_soon": {"month": "*", "day": "*", "day_of_week": "*", "hour": "0", "minute": "3"},
"datalog_journal_added_update": {"month": "*", "day": "*", "day_of_week": "*", "hour": "*", "minute": "*/30"},
"auto_assign_editor_group_data": {"month": "*", "day": "*/7", "day_of_week": "*", "hour": "3", "minute": "30"},
"ris_export": CRON_NEVER,
"site_statistics": {"month": "*", "day": "*", "day_of_week": "*", "hour": "*", "minute": "40"},
"article_deletion_notifications": {"month": "*", "day": "*", "day_of_week": "1", "hour": "5", "minute": "10"},
"approaching_flag_deadline": CRON_NEVER,
}
# =======================
# Account settings
PUBLIC_REGISTER = True
LOGIN_VIA_ACCOUNT_ID = True
# 2022-12-09 enable the background handler for asynchronous event processing
EVENT_SEND_FUNCTION = "portality.events.background.send_event"
# No plausible on test
PLAUSIBLE_URL = None
# Testdrive enabled
TESTDRIVE_ENABLED = True
# =======================
# Selenium test settings
#SELENIUM_REMOTE_URL = 'http://localhost:4444/wd/hub'
#SELENIUM_DOAJ_HOST = '172.17.0.1'
SELENIUM_REMOTE_URL = ''
SELENIUM_DOAJ_HOST = '127.0.0.1'
##################################################
# Autocheck Resource configurations
# Should we autocheck incoming applications and update requests issue #3933
AUTOCHECK_INCOMING = True
AUTOCHECK_RESOURCE_ISSN_ORG_TIMEOUT = 10
AUTOCHECK_RESOURCE_ISSN_ORG_THROTTLE = 1 # seconds between requests
# Enable test domains for shorturl
URLSHORT_ALLOWED_SUPERDOMAINS = ['doaj.cottagelabs.com']
PREMIUM_PHASE_IN = False
PREMIUM_PHASE_IN_START = datetime(2025, 7, 7)
# 2026-08-31 temporary tolerance for old-format journal-like documents during the
# 4316_separate_notes migration. Revert to False (or delete in here) once the anon export has been run and created
# the notes index. Means we don't need to run migration on all test servers.
SEAMLESS_JOURNAL_LIKE_OTHER_FIELDS = True