Bind a worker's name and labels into its token; list and revoke tokens by jti
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013GAeg4Jo6xjZzjwy9QDWMQ
This commit is contained in:
@@ -199,7 +199,9 @@ class SlurmProvisioner:
|
||||
|
||||
def _submit(self, profile: SlurmProfile) -> None:
|
||||
worker = f"{self.name}-{profile.name}-{uuid.uuid4().hex[:8]}"
|
||||
token = security.create_worker_token(worker, timedelta(hours=TOKEN_HOURS))
|
||||
token = security.create_worker_token(
|
||||
worker, timedelta(hours=TOKEN_HOURS), labels=profile.labels
|
||||
)
|
||||
try:
|
||||
result = self._ssh(["sbatch", "--parsable"], self._payload(profile, token))
|
||||
except (OSError, subprocess.SubprocessError) as exc:
|
||||
|
||||
Reference in New Issue
Block a user