Update public source
This commit is contained in:
@@ -181,28 +181,53 @@ def jobs_page():
|
||||
"limited",
|
||||
)
|
||||
|
||||
if issue_mode == "all":
|
||||
limit = None
|
||||
else:
|
||||
limit_raw = request.form.get(
|
||||
"limit",
|
||||
"100",
|
||||
).strip()
|
||||
if issue_mode == "search":
|
||||
|
||||
try:
|
||||
limit = int(limit_raw)
|
||||
except ValueError as exc:
|
||||
if not search_context_token:
|
||||
raise JobIssuanceError(
|
||||
"Количество handshakes должно быть целым числом."
|
||||
) from exc
|
||||
"Search context is missing. Return to Search "
|
||||
"and export the results again."
|
||||
)
|
||||
|
||||
issued_job = issuance_service.issue_job(
|
||||
method_id=selected_method_id,
|
||||
method_version=selected_version,
|
||||
limit=limit,
|
||||
)
|
||||
issued_job = (
|
||||
issuance_service.issue_job_from_search_context(
|
||||
token=search_context_token,
|
||||
method_id=selected_method_id,
|
||||
method_version=selected_version,
|
||||
)
|
||||
)
|
||||
|
||||
else:
|
||||
|
||||
if issue_mode == "all":
|
||||
limit = None
|
||||
else:
|
||||
limit_raw = request.form.get(
|
||||
"limit",
|
||||
"100",
|
||||
).strip()
|
||||
|
||||
try:
|
||||
limit = int(limit_raw)
|
||||
except ValueError as exc:
|
||||
raise JobIssuanceError(
|
||||
"Количество handshakes должно быть целым числом."
|
||||
) from exc
|
||||
|
||||
issued_job = issuance_service.issue_job(
|
||||
method_id=selected_method_id,
|
||||
method_version=selected_version,
|
||||
limit=limit,
|
||||
)
|
||||
|
||||
if issued_job is None:
|
||||
|
||||
if issue_mode == "search":
|
||||
raise JobIssuanceError(
|
||||
"No handshakes from Search results are available "
|
||||
"for the selected method and version."
|
||||
)
|
||||
|
||||
raise JobIssuanceError(
|
||||
"Нет handshakes, доступных для нового job."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user