Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
de5b730b
Commit
de5b730b
authored
5 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Disable caching for Flask.
parent
9f115e2e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api.py
+5
-2
5 additions, 2 deletions
api.py
with
5 additions
and
2 deletions
api.py
+
5
−
2
View file @
de5b730b
...
...
@@ -42,6 +42,7 @@ from libraries.base.logger import AuraLogger
from
libraries.base.config
import
AuraConfig
from
libraries.database.broadcasts
import
AuraDatabaseModel
,
Schedule
,
Playlist
,
PlaylistEntry
,
PlaylistEntryMetaData
,
TrackService
from
flask_caching
import
Cache
#
...
...
@@ -52,6 +53,10 @@ config = AuraConfig()
app
=
Flask
(
__name__
)
app
.
config
[
"
SQLALCHEMY_TRACK_MODIFICATIONS
"
]
=
False
app
.
config
[
"
SQLALCHEMY_DATABASE_URI
"
]
=
config
.
get_database_uri
()
app
.
config
[
"
CACHE_TYPE
"
]
=
"
simple
"
app
.
config
[
"
CACHE_DEFAULT_TIMEOUT
"
]
=
0
app
.
config
[
'
SEND_FILE_MAX_AGE_DEFAULT
'
]
=
0
cache
=
Cache
(
app
)
cors
=
CORS
(
app
,
resources
=
{
r
"
/*
"
:
{
"
origins
"
:
"
*
"
}})
db
=
SQLAlchemy
(
app
)
ma
=
Marshmallow
(
app
)
...
...
@@ -189,8 +194,6 @@ class TrackServiceResource(Resource):
today
=
date
.
today
()
today
=
datetime
(
today
.
year
,
today
.
month
,
today
.
day
)
tracks
=
TrackService
.
select_by_day
(
today
)
for
entry
in
tracks
:
print
(
entry
)
return
EngineApi
.
trackservice_schema
.
dump
(
tracks
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment