sr-npm 1.7.1314 → 1.7.1316

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.
package/backend/consts.js CHANGED
@@ -68,7 +68,7 @@ const TASKS = {
68
68
  getIdentifier:()=>"SHOULD_NEVER_SKIP",
69
69
  process:syncJobsFast,
70
70
  shouldSkipCheck:()=>false,
71
- estimatedDurationSec:60
71
+ estimatedDurationSec:120
72
72
  }
73
73
  }
74
74
 
package/backend/data.js CHANGED
@@ -243,11 +243,12 @@ async function populateCustomValuesCollection(customFieldsValues) {
243
243
  await wixData.bulkSave(COLLECTIONS.CUSTOM_VALUES, valuesToinsert);
244
244
  }
245
245
 
246
- async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS() {
246
+ async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS(jobsWithNoDescriptions) {
247
247
  console.log('🚀 Starting job descriptions update process for ALL jobs');
248
+ console.log("jobsWithNoDescriptions: ",jobsWithNoDescriptions);
248
249
 
249
250
  try {
250
- let jobsWithNoDescriptions = await getJobsWithNoDescriptions();
251
+ // let jobsWithNoDescriptions = await getJobsWithNoDescriptions();
251
252
 
252
253
  if (siteconfig.customFields==="true") {
253
254
  let customValues = await getAllCustomValues();
@@ -266,14 +267,14 @@ async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS() {
266
267
  // let totalFailed = 0;
267
268
  // let totalProcessed = 0;
268
269
 
269
- console.log(
270
- `Total jobs in database without descriptions: ${jobsWithNoDescriptions?.items?.length}`
271
- );
270
+ // console.log(
271
+ // `Total jobs in database without descriptions: ${jobsWithNoDescriptions?.length}`
272
+ // );
272
273
 
273
- if (jobsWithNoDescriptions.items.length === 0) {
274
- console.log('No jobs found in database');
275
- return { success: true, message: 'No jobs found' };
276
- }
274
+ // if (jobsWithNoDescriptions.length === 0) {
275
+ // console.log('No jobs found in database');
276
+ // return { success: true, message: 'No jobs found' };
277
+ // }
277
278
 
278
279
 
279
280
  // const API_CHUNK_SIZE = 80;
@@ -533,7 +534,7 @@ async function syncJobsFast() {
533
534
  console.log("saved jobs data to CMS successfully");//change comment
534
535
 
535
536
  console.log("saving jobs descriptions and location apply url to CMS");//change comment
536
- const status=await saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS();
537
+ const status=await saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS(jobsData);
537
538
 
538
539
  console.log("status inside syncJobsFast: ",status);
539
540
  if(status.success){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1314",
3
+ "version": "1.7.1316",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {