sr-npm 1.7.369 → 1.7.371

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 +3 -2
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -4,7 +4,7 @@ const { createCollectionIfMissing } = require('@hisense-staging/velo-npm/backend
4
4
  const { COLLECTIONS, COLLECTIONS_FIELDS,JOBS_COLLECTION_FIELDS } = require('./collectionConsts');
5
5
  const { chunkedBulkOperation, countJobsPerGivenField, fillCityLocationAndLocationAddress ,prepareToSaveArray,normalizeCityName} = require('./utils');
6
6
  const { getAllPositions } = require('./queries');
7
- const { getCompanyIdFromCMS } = require('./fetchPositionsFromSRAPI');
7
+ const { getCompanyId } = require('./secretsData');
8
8
 
9
9
  function validatePosition(position) {
10
10
  if (!position.id) {
@@ -292,7 +292,7 @@ async function createCompanyIdCollectionAndFillIt() {
292
292
  console.log("Creating CompanyId collection and filling it with the company ID");
293
293
  await createCollectionIfMissing(COLLECTIONS.COMPANY_ID, COLLECTIONS_FIELDS.COMPANY_ID,null,'singleItem');
294
294
  console.log("Getting the company ID ");
295
- const companyId = await getCompanyIdFromCMS();
295
+ const companyId = await getCompanyId();
296
296
  console.log("companyId is : ", companyId);
297
297
  console.log("Inserting the company ID into the CompanyId collection");
298
298
  try {
@@ -340,6 +340,7 @@ async function referenceJobs() {
340
340
 
341
341
  async function syncJobsFast() {
342
342
  console.log("Syncing jobs fast");
343
+ await createCompanyIdCollectionAndFillIt();
343
344
  await createCollections();
344
345
  await clearCollections();
345
346
  console.log("saving jobs data to CMS");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.369",
3
+ "version": "1.7.371",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {