sr-npm 1.7.211 → 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 +6 -12
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -326,9 +326,7 @@ async function referenceJobs() {
326
326
 
327
327
  async function syncJobsFast() {
328
328
  console.log("Syncing jobs fast");
329
- console.log("Creating collections");
330
329
  await createCollections();
331
- console.log("created collections successfully");
332
330
  await clearCollections();
333
331
  console.log("saving jobs data to CMS");
334
332
  await saveJobsDataToCMS();
@@ -336,22 +334,18 @@ async function syncJobsFast() {
336
334
  console.log("saving jobs descriptions and location apply url to CMS");
337
335
  await saveJobsDescriptionsAndLocationApplyUrlToCMS();
338
336
  console.log("saved jobs descriptions and location apply url to CMS successfully");
339
- console.log("aggregating jobs");
340
337
  await aggregateJobs();
341
- console.log("aggregated jobs successfully");
342
- console.log("referencing jobs");
343
338
  await referenceJobs();
344
- console.log("referenced jobs successfully");
345
339
  console.log("syncing jobs fast finished successfully");
346
340
  }
347
341
 
348
342
  async function clearCollections() {
349
- console.log("clearing cities collection");
350
- await wixData.truncate(COLLECTIONS.CITIES);
351
- console.log("clearing amount of jobs per department collection");
352
- await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
353
- console.log("clearing jobs collection");
354
- 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
+ ]);
355
349
  console.log("cleared collections successfully");
356
350
  }
357
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.211",
3
+ "version": "1.7.212",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {