@@ -108,7 +108,9 @@ async def push_to_dokku(
108108 app_name : str ,
109109 branch : str = "master" ,
110110):
111- logging .info (f"[push_to_dokku]:{ app_name } :{ branch } ::Preparing to push application..." )
111+ logging .info (
112+ f"[push_to_dokku]:{ app_name } :{ branch } ::Preparing to push application..."
113+ )
112114 env = os .environ .copy ()
113115
114116 env ["GIT_SSH_COMMAND" ] = (
@@ -148,7 +150,9 @@ async def push_to_dokku(
148150 cwd = repo_path ,
149151 check = True ,
150152 )
151- logging .info (f"[push_to_dokku]:{ app_name } :{ branch } ::Branch successfully detected." )
153+ logging .info (
154+ f"[push_to_dokku]:{ app_name } :{ branch } ::Branch successfully detected."
155+ )
152156 except subprocess .CalledProcessError :
153157 current_branch_stdout , _ = await run_git_command (
154158 "git" ,
@@ -159,7 +163,9 @@ async def push_to_dokku(
159163 check = True ,
160164 )
161165 branch = current_branch_stdout .strip ()
162- logging .info (f"[push_to_dokku]:{ app_name } :{ branch } ::Set up the current branch by 'git rev-parse'." )
166+ logging .info (
167+ f"[push_to_dokku]:{ app_name } :{ branch } ::Set up the current branch by 'git rev-parse'."
168+ )
163169
164170 process = await asyncio .create_subprocess_exec (
165171 "git" ,
@@ -175,7 +181,9 @@ async def push_to_dokku(
175181 )
176182
177183 try :
178- stdout , stderr = await asyncio .wait_for (process .communicate (), timeout = 30 * 60 )
184+ stdout , stderr = await asyncio .wait_for (
185+ process .communicate (), timeout = 30 * 60
186+ )
179187 output = stdout .decode () if stdout else ""
180188 error = stderr .decode () if stderr else ""
181189
@@ -186,9 +194,13 @@ async def push_to_dokku(
186194 output = stdout ,
187195 )
188196 if error :
189- logging .info (f"[push_to_dokku]:{ app_name } :{ branch } ::Something went wrong... { error } " )
190-
191- logging .info (f"[push_to_dokku]:{ app_name } :{ branch } ::Finished deployment. { output } " )
197+ logging .info (
198+ f"[push_to_dokku]:{ app_name } :{ branch } ::Something went wrong... { error } "
199+ )
200+
201+ logging .info (
202+ f"[push_to_dokku]:{ app_name } :{ branch } ::Finished deployment. { output } "
203+ )
192204 return f"{ output } { error } "
193205
194206 except asyncio .TimeoutError :
0 commit comments