Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Machina Callida
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
callidus
Machina Callida
Commits
a57fd5d5
Commit
a57fd5d5
authored
May 18, 2020
by
Konstantin Schulz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce detailed logging for every database action
parent
516734c9
Pipeline
#11601
passed with stages
in 3 minutes and 46 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
+3
-0
mc_backend/mcserver/app/api/corpusListAPI.py
mc_backend/mcserver/app/api/corpusListAPI.py
+1
-0
mc_backend/mcserver/app/services/databaseService.py
mc_backend/mcserver/app/services/databaseService.py
+1
-0
mc_backend/mcserver/config.py
mc_backend/mcserver/config.py
+1
-0
No files found.
mc_backend/mcserver/app/api/corpusListAPI.py
View file @
a57fd5d5
...
...
@@ -16,6 +16,7 @@ def get(last_update_time: int) -> Union[Response, ConnexionResponse]:
ui_cts
:
UpdateInfo
try
:
ui_cts
=
db
.
session
.
query
(
UpdateInfo
).
filter_by
(
resource_type
=
ResourceType
.
cts_data
.
name
).
first
()
db
.
session
.
commit
()
except
(
InvalidRequestError
,
OperationalError
):
db
.
session
.
rollback
()
return
NetworkService
.
make_json_response
(
None
)
...
...
mc_backend/mcserver/app/services/databaseService.py
View file @
a57fd5d5
...
...
@@ -20,6 +20,7 @@ class DatabaseService:
def
check_corpus_list_age
(
app
:
Flask
)
->
None
:
""" Checks whether the corpus list needs to be updated. If yes, it performs the update. """
ui_cts
:
UpdateInfo
=
db
.
session
.
query
(
UpdateInfo
).
filter_by
(
resource_type
=
ResourceType
.
cts_data
.
name
).
first
()
db
.
session
.
commit
()
if
ui_cts
is
None
:
return
else
:
...
...
mc_backend/mcserver/config.py
View file @
a57fd5d5
...
...
@@ -127,6 +127,7 @@ class Config(object):
SERVER_URI_VOCABULARY
=
SERVER_URI_BASE
+
"vocabulary"
# END endpoints
SQLALCHEMY_DATABASE_URI
=
os
.
environ
.
get
(
"DATABASE_URL"
)
or
DATABASE_URL_SQLITE
SQLALCHEMY_ECHO
=
True
SQLALCHEMY_TRACK_MODIFICATIONS
=
False
STATIC_EXERCISES_REPOSITORY_URL
=
"https://scm.cms.hu-berlin.de/callidus/machina-callida/-/archive/master/machina-callida-master.zip?path=mc_frontend%2Fsrc%2Fassets%2Fh5p"
STOP_WORDS_LATIN_PATH
=
os
.
path
.
join
(
CACHE_DIRECTORY
,
"stop_words_latin.json"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment