gitlink定制:gitee和github分开同步,输出异常

This commit is contained in:
“xxq250” 2022-08-10 11:18:17 +08:00
parent 518f37275d
commit a2150a72ef
1 changed files with 3 additions and 3 deletions

View File

@ -90,8 +90,8 @@ async def sync_inter_code_by_rabase(project: ProjectDTO, job: JobDTO):
"git log HEAD~1..HEAD --oneline", repo_dir, job)
commit = result.split(" ")[0]
await service.update_job_lateset_commit(job.id, commit)
except:
msg = f"Sync the code from inter to outer of project {project.name} branch {job.github_branch} failed"
except Exception as e:
msg = f"Sync the code from inter to outer of project {project.name} branch {job.github_branch} failed {e}"
await Log(LogType.ERROR, msg, job.id)
finally:
await cmd.shell(f"rm -rf {dir}", '.', job)
@ -145,7 +145,7 @@ async def sync():
tasks = []
for job in gitee_jobs:
await Log(LogType.INFO,
f"The gitlink branch {job.gitlink_branch} from {job.project} is now syncing", job.id)
f"The gitlink branch {job.gitlink_branch} from {job.project} is now syncing...", job.id)
task = asyncio.create_task(sync_job(job))
tasks.append(task)