public function addFileToJobSync($jobId, AddFileToJobParameters $parameters)
{
$result = sendRequest('/jobs-api/v3/projects/{projectId}/jobs/{translationJobUid}/file/add', $parameters);
if ($result == 202) {
$start_time = time();
do {
if ((time() - $start_time) > $tomeout) then
throw new SmartlingException();
sleep(5);
$result = sendRequest('/jobs-api/v3/projects/{projectId}/jobs/{translationJobUid}/processes/{processUid}');
}
while $result;
}
}
Of course we block execution of entire application but in general you cannot do anything with job until all async operations are completed.
Currently the sdk integrates with Jobs API v2. Could you update to v3?
DoD:
Update implementation of following methods and add
Syncsuffix to method names