Skip to content

Commit

Permalink
THEME-KIT #20 | add time sleep when push template
Browse files Browse the repository at this point in the history
  • Loading branch information
gorsutlame committed Mar 22, 2024
1 parent 490971b commit 295e4ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ntk/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def _push_templates(self, template_names, compile_sass=False):

response = self.gateway.create_or_update_template(
theme_id=self.config.theme_id, template_name=relative_pathfile, content=content, files=files)

time.sleep(0.07)
if not response.ok:
return

Expand All @@ -94,7 +96,7 @@ def _pull_templates(self, template_names):
response = self.gateway.get_templates(theme_id=self.config.theme_id)
templates = response.json()

if type(templates) != list:
if not isinstance(templates, list):
return

template_count = len(templates)
Expand Down

0 comments on commit 295e4ea

Please sign in to comment.