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 +1 -1
- package/backend/data.js +11 -10
- package/package.json +1 -1
package/backend/consts.js
CHANGED
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
|
-
|
|
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
|
-
|
|
271
|
-
);
|
|
270
|
+
// console.log(
|
|
271
|
+
// `Total jobs in database without descriptions: ${jobsWithNoDescriptions?.length}`
|
|
272
|
+
// );
|
|
272
273
|
|
|
273
|
-
if (jobsWithNoDescriptions.
|
|
274
|
-
|
|
275
|
-
|
|
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){
|