sr-npm 1.7.43 → 1.7.44

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 +2 -3
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -1,7 +1,6 @@
1
1
  const { items: wixData } = require('@wix/data');
2
2
  const { fetchPositionsFromSRAPI, fetchJobDescription } = require('./fetchPositionsFromSRAPI');
3
3
  const { chunkedBulkOperation, delay, countJobsPerGivenField, fillCityLocation ,prepateToSaveArray,normalizeCityName} = require('./utils');
4
- const { QUERY_MAX_LIMIT } = require('./consts');
5
4
  const { getAllPositions } = require('./queries');
6
5
 
7
6
 
@@ -179,7 +178,7 @@ async function aggregateJobsByFieldToCMS({ field, collection }) {
179
178
  async function getJobsWithNoDescriptions() {
180
179
  let jobswithoutdescriptionsQuery = await wixData
181
180
  .query('Jobs1')
182
- .limit(QUERY_MAX_LIMIT)
181
+ .limit(1000)
183
182
  .isEmpty('jobDescription')
184
183
  .find();
185
184
  return jobswithoutdescriptionsQuery;
@@ -193,7 +192,7 @@ async function getJobsWithNoDescriptions() {
193
192
  */
194
193
  async function referenceJobsToField({ referenceField, sourceCollection, jobField }) {
195
194
  // Fetch all source items (cities or departments)
196
- const sources = await wixData.query(sourceCollection).limit(QUERY_MAX_LIMIT).find();
195
+ const sources = await wixData.query(sourceCollection).limit(1000).find();
197
196
  const sourceMap = {};
198
197
  for (const item of sources.items) {
199
198
  sourceMap[item.title] = item._id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.43",
3
+ "version": "1.7.44",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {