Commit 30b3c871 authored by Romain Loth's avatar Romain Loth

[FEAT] project view: show in real time the progression of active corpora...

[FEAT] project view: show in real time the progression of active corpora workflow progressbars (use status API at regular increasing intervals 10 times, then stop trying, parameters are configurable)
parent 2d5a6ac0
......@@ -382,6 +382,9 @@ BATCH_NGRAMSEXTRACTION_SIZE = 3000 # how many new node-ngram relations before
QUERY_SIZE_N_MAX = 1000
QUERY_SIZE_N_DEFAULT = 1000
# Refresh corpora workflow status for project view's progressbar
PROJECT_VIEW_REFRESH_INTERVAL = 3000 # in ms
PROJECT_VIEW_MAX_REFRESH_ATTEMPTS = 5 # how many times before we give up
# ------------------------------------------------------------------------------
# Graph <=> nodes API parameters
......
......@@ -54,6 +54,9 @@ def overview(request):
# projects owned by the user's contacts
'common_users': (contact for contact, projects in contacts_projects),
'common_projects': sum((projects for contact, projects in contacts_projects), []),
# status refreshing params (when active workflows)
'status_refresh_initial_interval': PROJECT_VIEW_REFRESH_INTERVAL,
'status_refresh_max_attempts': PROJECT_VIEW_MAX_REFRESH_ATTEMPTS,
},
)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment