Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scodoc_issue_976
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Louis Dormael
scodoc_issue_976
Commits
ddcc5188
Commit
ddcc5188
authored
3 years ago
by
Emmanuel Viennet
Browse files
Options
Downloads
Patches
Plain Diff
Memoize (cache) user_info
parent
5002afad
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
app/scodoc/sco_users.py
+2
-1
2 additions, 1 deletion
app/scodoc/sco_users.py
sco_version.py
+1
-1
1 addition, 1 deletion
sco_version.py
with
4 additions
and
3 deletions
README.md
+
1
−
1
View file @
ddcc5188
...
...
@@ -157,7 +157,7 @@ Sur une machine de DEV, lancer
flask profile --host 0.0.0.0 --length 32 --profile-dir /opt/scodoc-data
le fichier
`.prof`
sera alors écrit dans
`/opt/sco
i
doc-data`
(on peut aussi utiliser
`/tmp`
).
le fichier
`.prof`
sera alors écrit dans
`/opt/scodoc-data`
(on peut aussi utiliser
`/tmp`
).
Pour la visualisation,
[
snakeviz
](
https://jiffyclub.github.io/snakeviz/
)
est bien:
...
...
This diff is collapsed.
Click to expand it.
app/scodoc/sco_users.py
+
2
−
1
View file @
ddcc5188
...
...
@@ -46,7 +46,7 @@ from app.scodoc import sco_etud
from
app.scodoc
import
sco_excel
from
app.scodoc
import
sco_preferences
from
app.scodoc.gen_tables
import
GenTable
from
app
import
log
from
app
import
log
,
cache
from
app.scodoc.scolog
import
logdb
import
app.scodoc.sco_utils
as
scu
...
...
@@ -226,6 +226,7 @@ def _user_list(user_name):
return
None
@cache.memoize
(
timeout
=
50
)
# seconds
def
user_info
(
user_name_or_id
=
None
,
user
=
None
):
"""
Dict avec infos sur l
'
utilisateur (qui peut ne pas etre dans notre base).
Si user_name est specifie (string ou id), interroge la BD. Sinon, user doit etre une instance
...
...
This diff is collapsed.
Click to expand it.
sco_version.py
+
1
−
1
View file @
ddcc5188
# -*- mode: python -*-
# -*- coding: utf-8 -*-
SCOVERSION
=
"
9.0.5
8
"
SCOVERSION
=
"
9.0.5
9
"
SCONAME
=
"
ScoDoc
"
...
...
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