Skip to content

Commit a40bef3

Browse files
authored
fix: stuck condition (#3660)
1 parent a59ff78 commit a40bef3

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

services/apps/git_integration/src/crowdgit/worker/repository_worker.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,16 @@ async def _ensure_repo_not_stuck(self, repository: Repository):
111111
)
112112

113113
# handling
114-
if repo_stuck and repository.forked_from == repository.url:
114+
if repo_stuck:
115115
logger.warning(
116-
f"Repo {repository.url} is stuck due to force-push or dangling commit. Will be re-onboarded"
116+
f"Repo {repository.url} is stuck for {processing_duration_hours} hours!"
117117
)
118-
raise ReOnboardingRequiredError()
119-
120-
raise StuckRepoError()
118+
if repository.forked_from == repository.url:
119+
logger.warning(
120+
f"Repo {repository.url} is stuck due to force-push or dangling commit. Will be re-onboarded"
121+
)
122+
raise ReOnboardingRequiredError()
123+
raise StuckRepoError()
121124

122125
async def _process_repositories(self):
123126
"""

0 commit comments

Comments
 (0)