Skip to content

Commit

Permalink
Merge pull request #155 from CogStack/no-hot-reload
Browse files Browse the repository at this point in the history
Env var parsing fix and Home Project loading fix
  • Loading branch information
tomolopolis authored Oct 9, 2023
2 parents 8db7075 + 96fa5b7 commit 15adac4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions webapp/api/api/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class ApiConfig(AppConfig):
def ready(self):
from api.views import _submit_document
from api.models import ProjectAnnotateEntities
resubmit_all = os.environ.get('RESUBMIT_ALL_ON_STARTUP', False)
if resubmit_all:
resubmit_all = os.environ.get('RESUBMIT_ALL_ON_STARTUP', None)
if resubmit_all is not None and resubmit_all.lower() in ('1', 'y', 'true'):
logger.info('Found env var RESUBMIT_ALL_ON_STARTUP is True. '
'Attempting to resubmit all currently submitted state documents')
projects = ProjectAnnotateEntities.objects.all()
Expand Down
11 changes: 7 additions & 4 deletions webapp/frontend/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,7 @@ export default {
if (resp.data.next) {
this.fetchPage(resp.data.next)
} else {
this.fetchCDBsLoaded()
this.fetchSearchIndexStatus()
this.loadingProjects = false
this.postLoadedProjects()
}
}).catch(() => {
this.$cookie.delete('username')
Expand All @@ -263,10 +261,15 @@ export default {
if (resp.data.next) {
this.fetchPage(resp.data.next)
} else {
this.fetchCDBsLoaded()
this.postLoadedProjects()
}
})
},
postLoadedProjects () {
this.fetchCDBsLoaded()
this.fetchSearchIndexStatus()
this.loadingProjects = false
},
fetchCDBsLoaded () {
this.$http.get('/api/model-loaded/').then(resp => {
this.cdbLoaded = resp.data
Expand Down

0 comments on commit 15adac4

Please sign in to comment.