sr-npm 1.7.1323 → 1.7.1324

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 +4 -2
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -408,7 +408,7 @@ async function syncJobsFast() {
408
408
  try{
409
409
  console.log("Syncing jobs fast");
410
410
  await createCollections();
411
- await clearCollections();
411
+
412
412
  await fillSecretManagerMirror();
413
413
 
414
414
  console.log("retrieving jobs data from SR API");
@@ -422,7 +422,8 @@ async function syncJobsFast() {
422
422
  const status=await retrieveJobsDescriptionsAndLocationApplyUrlReferences(jobsData);
423
423
  throw new Error("test");
424
424
  if(status.success){
425
- await wixData.truncate(COLLECTIONS.JOBS)
425
+
426
+ await clearCollections();
426
427
  const updatedJobs=status.updatedJobs;
427
428
  console.log("saving jobs to CMS");
428
429
  await saveJobsToCMS(updatedJobs);
@@ -495,6 +496,7 @@ async function clearCollections() {
495
496
  wixData.truncate(COLLECTIONS.CITIES),
496
497
  wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT),
497
498
  wixData.truncate(COLLECTIONS.BRANDS),
499
+ wixData.truncate(COLLECTIONS.JOBS),
498
500
  siteconfig.customFields==="true" ? wixData.truncate(COLLECTIONS.CUSTOM_VALUES) : null,
499
501
  siteconfig.customFields==="true" ? wixData.truncate(COLLECTIONS.CUSTOM_FIELDS) : null,
500
502
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1323",
3
+ "version": "1.7.1324",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {