sr-npm 1.7.210 → 1.7.212

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 +8 -16
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -319,18 +319,14 @@ async function aggregateJobs() {
319
319
 
320
320
  async function referenceJobs() {
321
321
  console.log("Reference jobs");
322
- await Promise.all([
323
- referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.DEPARTMENT_REF, sourceCollection: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT, jobField: JOBS_COLLECTION_FIELDS.DEPARTMENT }),
324
- referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.CITY, sourceCollection: COLLECTIONS.CITIES, jobField: JOBS_COLLECTION_FIELDS.CITY_TEXT }),
325
- ]);
322
+ await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.DEPARTMENT_REF, sourceCollection: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT, jobField: JOBS_COLLECTION_FIELDS.DEPARTMENT });
323
+ await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.CITY, sourceCollection: COLLECTIONS.CITIES, jobField: JOBS_COLLECTION_FIELDS.CITY_TEXT });
326
324
  console.log("finished referencing jobs");
327
325
  }
328
326
 
329
327
  async function syncJobsFast() {
330
328
  console.log("Syncing jobs fast");
331
- console.log("Creating collections");
332
329
  await createCollections();
333
- console.log("created collections successfully");
334
330
  await clearCollections();
335
331
  console.log("saving jobs data to CMS");
336
332
  await saveJobsDataToCMS();
@@ -338,22 +334,18 @@ async function syncJobsFast() {
338
334
  console.log("saving jobs descriptions and location apply url to CMS");
339
335
  await saveJobsDescriptionsAndLocationApplyUrlToCMS();
340
336
  console.log("saved jobs descriptions and location apply url to CMS successfully");
341
- console.log("aggregating jobs");
342
337
  await aggregateJobs();
343
- console.log("aggregated jobs successfully");
344
- console.log("referencing jobs");
345
338
  await referenceJobs();
346
- console.log("referenced jobs successfully");
347
339
  console.log("syncing jobs fast finished successfully");
348
340
  }
349
341
 
350
342
  async function clearCollections() {
351
- console.log("clearing cities collection");
352
- await wixData.truncate(COLLECTIONS.CITIES);
353
- console.log("clearing amount of jobs per department collection");
354
- await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
355
- console.log("clearing jobs collection");
356
- await wixData.truncate(COLLECTIONS.JOBS);
343
+ console.log("clearing collections");
344
+ await Promise.all([
345
+ wixData.truncate(COLLECTIONS.CITIES),
346
+ wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT),
347
+ wixData.truncate(COLLECTIONS.JOBS)
348
+ ]);
357
349
  console.log("cleared collections successfully");
358
350
  }
359
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.210",
3
+ "version": "1.7.212",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {