sr-npm 1.7.206 → 1.7.208

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 +10 -4
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -310,9 +310,9 @@ async function createCollections() {
310
310
 
311
311
  async function aggregateJobs() {
312
312
  console.log("truncating cities collection");
313
- await wixData.truncate(COLLECTIONS.CITIES);
313
+ //await wixData.truncate(COLLECTIONS.CITIES);
314
314
  console.log("truncating amount of jobs per department collection");
315
- await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
315
+ //await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
316
316
  console.log("Aggregating jobs");
317
317
  await aggregateJobsByFieldToCMS({ field: JOBS_COLLECTION_FIELDS.DEPARTMENT, collection: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT });
318
318
  await aggregateJobsByFieldToCMS({ field: JOBS_COLLECTION_FIELDS.CITY_TEXT, collection: COLLECTIONS.CITIES });
@@ -321,9 +321,9 @@ async function aggregateJobs() {
321
321
 
322
322
  async function referenceJobs() {
323
323
  console.log("truncating cities collection");
324
- await wixData.truncate(COLLECTIONS.CITIES);
324
+ //await wixData.truncate(COLLECTIONS.CITIES);
325
325
  console.log("truncating amount of jobs per department collection");
326
- await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
326
+ //await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
327
327
  console.log("Reference jobs");
328
328
  await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.DEPARTMENT_REF, sourceCollection: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT, jobField: JOBS_COLLECTION_FIELDS.DEPARTMENT })
329
329
  await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.CITY, sourceCollection: COLLECTIONS.CITIES, jobField: JOBS_COLLECTION_FIELDS.CITY_TEXT }),
@@ -335,6 +335,12 @@ async function syncJobsFast() {
335
335
  console.log("Creating collections");
336
336
  await createCollections();
337
337
  console.log("created collections successfully");
338
+ console.log("truncating cities collection");
339
+ await wixData.truncate(COLLECTIONS.CITIES);
340
+ console.log("truncating amount of jobs per department collection");
341
+ await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
342
+ console.log("truncating jobs collection");
343
+ await wixData.truncate(COLLECTIONS.JOBS);
338
344
  console.log("saving jobs data to CMS");
339
345
  await saveJobsDataToCMS();
340
346
  console.log("saved jobs data to CMS successfully");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.206",
3
+ "version": "1.7.208",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {