GetSignal
Returns the signal for the specified job.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const JobSignalRequest =
cloudApi.loadtesting.agent_job_service.JobSignalRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.JobServiceClient);
const result = await client.getSignal(
JobSignalRequest.fromPartial({
// jobId: "jobId"
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.dataproc.manager.v1.job_service_pb2_grpc import JobServiceStub
from yandex.cloud.loadtesting.agent.v1.job_service_pb2 import JobSignalRequest
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(JobServiceStub)
response = service.GetSignal(
JobSignalRequest(
# job_id = "jobId"
)
)
print(response)
JobSignalRequest
jobId
: string
JobSignalResponse
Signal
SIGNAL_UNSPECIFIED
STOP
WAIT
RUN_IN
signal
: Signal
waitDuration
: double
seconds
runIn
: double
seconds