forked from JOJ/Joint-Teapot
		
	fix: lock file path
This commit is contained in:
		
							parent
							
								
									940112e696
								
							
						
					
					
						commit
						80770873aa
					
				|  | @ -250,9 +250,10 @@ def joj3_scoreboard( | ||||||
|     logger.info(f"debug log to file: {settings.log_file_path}") |     logger.info(f"debug log to file: {settings.log_file_path}") | ||||||
|     if joj3.check_skipped(score_file_path, "skip-scoreboard"): |     if joj3.check_skipped(score_file_path, "skip-scoreboard"): | ||||||
|         return |         return | ||||||
|     lock = FileLock( |     lock_file_path = os.path.join( | ||||||
|         settings.joj3_lock_file_path, timeout=settings.joj3_lock_file_timeout |         settings.repos_dir, repo_name, settings.joj3_lock_file_path | ||||||
|     ) |     ) | ||||||
|  |     lock = FileLock(lock_file_path, timeout=settings.joj3_lock_file_timeout) | ||||||
|     with lock.acquire(): |     with lock.acquire(): | ||||||
|         repo_path = tea.pot.git.repo_clean_and_checkout(repo_name, "grading") |         repo_path = tea.pot.git.repo_clean_and_checkout(repo_name, "grading") | ||||||
|         repo: Repo = tea.pot.git.get_repo(repo_name) |         repo: Repo = tea.pot.git.get_repo(repo_name) | ||||||
|  | @ -325,9 +326,10 @@ def joj3_failed_table( | ||||||
|     logger.info(f"debug log to file: {settings.log_file_path}") |     logger.info(f"debug log to file: {settings.log_file_path}") | ||||||
|     if joj3.check_skipped(score_file_path, "skip-failed-table"): |     if joj3.check_skipped(score_file_path, "skip-failed-table"): | ||||||
|         return |         return | ||||||
|     lock = FileLock( |     lock_file_path = os.path.join( | ||||||
|         settings.joj3_lock_file_path, timeout=settings.joj3_lock_file_timeout |         settings.repos_dir, repo_name, settings.joj3_lock_file_path | ||||||
|     ) |     ) | ||||||
|  |     lock = FileLock(lock_file_path, timeout=settings.joj3_lock_file_timeout) | ||||||
|     with lock.acquire(): |     with lock.acquire(): | ||||||
|         repo_path = tea.pot.git.repo_clean_and_checkout(repo_name, "grading") |         repo_path = tea.pot.git.repo_clean_and_checkout(repo_name, "grading") | ||||||
|         repo: Repo = tea.pot.git.get_repo(repo_name) |         repo: Repo = tea.pot.git.get_repo(repo_name) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user