Skip to content

Commit

Permalink
chore: have download script pull jobs for one project at a time
Browse files Browse the repository at this point in the history
* added project_id 'argument' so only one project is checked at a time
* this means we run the script once for human translations, and once for
  machine translations
  • Loading branch information
moonlight-komorebi committed Dec 1, 2021
1 parent 9fb8254 commit 647c76d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/actions/check-job-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ const getBatchStatus = (accessToken) => async ({ batchUid, jobId }) => {
const main = async () => {
try {
// load the items that we are being translated
const inProgressJobs = await getJobs({ status: 'IN_PROGRESS' });
const inProgressJobs = await getJobs({
status: 'IN_PROGRESS',
project_id: PROJECT_ID,
});
const batchUids = inProgressJobs.map((job) => {
return { batchUid: job.batch_uid, jobId: job.id };
});
Expand Down

0 comments on commit 647c76d

Please sign in to comment.