-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Web autoassigner uses the *batch* autoassigner. * Web autoassigner uses fastcgi_finish_request() and a job API to check back. The goal is to support longer autoassigner runs. Also introduce "job" capabilities. These capabilities have inputData and outputData. Update the TokenInfo API.
- Loading branch information
Showing
34 changed files
with
1,206 additions
and
742 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
// api_job.php -- HotCRP job-related API calls | ||
// Copyright (c) 2008-2023 Eddie Kohler; see LICENSE. | ||
|
||
class Job_API { | ||
/** @return JsonResult */ | ||
static function job(Contact $user, Qrequest $qreq) { | ||
if (($jobid = trim($qreq->job ?? "")) === "") { | ||
return JsonResult::make_missing_error("job"); | ||
} else if (strlen($jobid) < 24 | ||
|| !preg_match('/\A\w+\z/', $jobid)) { | ||
return JsonResult::make_parameter_error("job"); | ||
} | ||
|
||
$tok = Job_Capability::find($jobid, $user->conf); | ||
if (!$tok) { | ||
return new JsonResult(404, ["ok" => false]); | ||
} else { | ||
$ok = $tok->is_active(); | ||
$jdata = $tok->data(); | ||
$answer = ["ok" => $ok] + (array) $jdata; | ||
$answer["ok"] = $ok; | ||
return new JsonResult($ok ? 200 : 409, $answer); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.