Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions submit_ce/implementations/compile/compile_api_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def start_preflight(self,
),
duration_sec=0,
utc_start_time=datetime.now(timezone.utc),
url="FAKE_URL_LOCAL_PREFLIGHT"
url="FAKE_URL_PREFLIGHT"
)

@override
Expand Down Expand Up @@ -219,26 +219,26 @@ def start_compile(self, submission: Submission,
),
duration_sec=0,
utc_start_time=datetime.now(timezone.utc),
url="FAKE_URL_LOCAL_COMPILE"
url="FAKE_URL_COMPILE"
)

@override
def check(self, process_id: str, user: User, client: Client) -> ProcessStatus:
logger.info("Checking local compilation for process %s", process_id)
logger.info("Checking compilation for process %s", process_id)
return ProcessStatus(
status=ProcessStatus.Status.SUCCEEDED,
creator=user,
created=datetime.now(timezone.utc),
details={'message': 'Local compilation check completed'}
details={'message': 'Compilation check completed'}
)

@override
def is_available(self) -> bool:
try:
resp = httpx.get(self.tex2pdf_url, timeout=1)
resp = httpx.get(settings.COMPILE_API_URL, timeout=1)
return resp.status_code == 200
except httpx.RequestError as exc:
logger.error(f"Local compile service at '{self.tex2pdf_url}' is not available: {exc}")
logger.error(f"Compile service at '{settings.COMPILE_API_URL}' is not available: {exc}")
return False

@override
Expand Down Expand Up @@ -297,7 +297,7 @@ def start_directives(self,
),
duration_sec=0,
utc_start_time=datetime.now(timezone.utc),
url="FAKE_URL_LOCAL_DIRECTIVES"
url="FAKE_URL_DIRECTIVES"

)
@override
Expand Down
Loading
Loading