Selaa lähdekoodia

modify create_content sleep 0.5s to 1s

weichen 4 vuotta sitten
vanhempi
commit
99cdd40097
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      backstage/utils/routes.py

+ 1 - 1
backstage/utils/routes.py

@@ -13,7 +13,7 @@ def create_content(data, image_data):
         requests.post(
             'http://127.0.0.1:5000/api/upload/static/img?type={}&filename={}'.format(
                 data.get('type'), image_data.filename), files={'image': image_data})
-        sleep(0.5)  # sleep for waiting for new_content API generating content successfully.
+        sleep(1)  # sleep for waiting for new_content API generating content successfully.
         return redirect(url_for('editor.editor', url='/{}/{}'.format(
             data.get('type'), get_trans_title_url_name(data.get('name')))))
     else: