Merge "Remove workaround for web page refresh"

This commit is contained in:
Jenkins 2016-06-29 09:45:08 +00:00 committed by Gerrit Code Review
commit 644377d217
1 changed files with 3 additions and 22 deletions

View File

@ -14,7 +14,6 @@
# from horizon. # from horizon.
import logging import logging
import time
from django.conf import settings from django.conf import settings
@ -121,13 +120,7 @@ class Job(object):
job.get('client_id')) job.get('client_id'))
def create(self, job): def create(self, job):
job = self._build(job) return self._build(job)
# due to elasticsearch replication time, sometimes the newly created
# file is not reflected in the ui immediately, so a quick and dirty
# workaround is to sleep for 3 seconds to make sure that the changes
# are reflected
time.sleep(3)
return job
def update(self, job_id, job): def update(self, job_id, job):
scheduling = {} scheduling = {}
@ -292,13 +285,7 @@ class Session(object):
session.get('schedule', {}).get('schedule_end_date')) session.get('schedule', {}).get('schedule_end_date'))
def create(self, session): def create(self, session):
session = self._build(session) return self._build(session)
# due to elasticsearch replication time, sometimes the newly created
# file is not reflected in the ui immediately, so a quick and dirty
# workaround is to sleep for 3 seconds to make sure that the changes
# are reflected
time.sleep(3)
return session
def update(self, session, session_id): def update(self, session, session_id):
return self.client.sessions.update(session_id, session) return self.client.sessions.update(session_id, session)
@ -387,13 +374,7 @@ class Action(object):
action['freezer_action'].get('storage')) action['freezer_action'].get('storage'))
def create(self, action): def create(self, action):
action = self._build(action) return self._build(action)
# due to elasticsearch replication time, sometimes the newly created
# file is not reflected in the ui immediately, so a quick and dirty
# workaround is to sleep for 3 seconds to make sure that the changes
# are reflected
time.sleep(3)
return action
def update(self, action, action_id): def update(self, action, action_id):
updated_action = {} updated_action = {}