Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend_api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
videoag
backend_api
Commits
cb272aa8
Commit
cb272aa8
authored
1 year ago
by
Simon Künzel
Browse files
Options
Downloads
Patches
Plain Diff
Make live config update interval configurable
parent
d44bdd57
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/api_example_config.py
+2
-0
2 additions, 0 deletions
config/api_example_config.py
src/api/live_config.py
+2
-1
2 additions, 1 deletion
src/api/live_config.py
with
4 additions
and
1 deletion
config/api_example_config.py
+
2
−
0
View file @
cb272aa8
...
...
@@ -98,6 +98,8 @@ DEFAULT_CACHE_CONTROL_MAX_AGE_SECONDS = 5 * 60
API_DIAGNOSTICS_HISTORY_SIZE_MINUTES
=
7
*
24
*
60
API_DIAGNOSTICS_INTERVAL_SIZE_MINUTES
=
30
LIVE_CONFIG_UPDATE_INTERVAL_SECONDS
=
60
# LDAP_HOST = "auth.fsmpi.rwth-aachen.de"
LDAP_PORT
=
636
LDAP_GROUPS
=
[
"
fachschaft
"
]
...
...
This diff is collapsed.
Click to expand it.
src/api/live_config.py
+
2
−
1
View file @
cb272aa8
import
os
from
pathlib
import
Path
import
api
from
api.miscellaneous
import
*
from
api.objects.types
import
TYPE_STRING_LONG
...
...
@@ -68,7 +69,7 @@ class LiveConfig:
config
:
LiveConfig
=
LiveConfig
()
@scheduled_function
(
10
,
1
)
@scheduled_function
(
api
.
config
[
"
LIVE_CONFIG_UPDATE_INTERVAL_SECONDS
"
]
,
1
)
def
_update_live_config
():
if
_LIVE_CONFIG_PATH
is
None
:
return
...
...
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