sr-npm 1.7.48 → 1.7.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/backend/data.js +2 -3
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -64,7 +64,6 @@ async function saveJobsDescriptionsAndLocationToCMS() {
64
64
  let totalUpdated = 0;
65
65
  let totalFailed = 0;
66
66
  let totalProcessed = 0;
67
- let pageNumber = 1;
68
67
 
69
68
  console.log(
70
69
  `Total jobs in database without descriptions: ${jobsWithNoDescriptions?.items?.length}`
@@ -80,7 +79,7 @@ async function saveJobsDescriptionsAndLocationToCMS() {
80
79
  const pageChunks = Math.ceil(jobsWithNoDescriptions.items.length / API_CHUNK_SIZE);
81
80
 
82
81
  await chunkedBulkOperation({
83
- items: currentPageJobs,
82
+ items: jobsWithNoDescriptions.items,
84
83
  chunkSize: API_CHUNK_SIZE,
85
84
  processChunk: async (chunk, chunkNumber) => {
86
85
  console.log(` Processing API chunk ${chunkNumber}/${pageChunks} (${chunk.length} jobs)`);
@@ -110,7 +109,7 @@ async function saveJobsDescriptionsAndLocationToCMS() {
110
109
  console.log(
111
110
  ` API chunk ${chunkNumber} completed: ${chunkSuccesses} success, ${chunkFailures} failed`
112
111
  );
113
- if (chunkNumber * API_CHUNK_SIZE < currentPageJobs.length) {
112
+ if (chunkNumber * API_CHUNK_SIZE < jobsWithNoDescriptions.items.length) {
114
113
  console.log(' Waiting 2 seconds before next API chunk...');
115
114
  await delay(2000);
116
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.48",
3
+ "version": "1.7.49",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {