sr-npm 1.7.49 → 1.7.51

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.
package/backend/data.js CHANGED
@@ -60,7 +60,6 @@ async function saveJobsDescriptionsAndLocationToCMS() {
60
60
 
61
61
  try {
62
62
  let jobsWithNoDescriptions = await getJobsWithNoDescriptions();
63
- console.log('jobsWithNoDescriptions is ', jobsWithNoDescriptions);
64
63
  let totalUpdated = 0;
65
64
  let totalFailed = 0;
66
65
  let totalProcessed = 0;
@@ -139,18 +138,11 @@ async function saveJobsDescriptionsAndLocationToCMS() {
139
138
 
140
139
 
141
140
  async function iterateOverAllJobs(results, field, jobsPerField, cityLocations) {
142
- let page = 1;
143
- do {
144
- console.log(`Page ${page}: ${results.length} jobs.`);
145
141
  countJobsPerGivenField(results, field, jobsPerField);
146
142
  if (field === 'cityText') {
147
143
  fillCityLocation(results, cityLocations);
148
144
  }
149
- if (results.hasNext()) {
150
- results = await results.next();
151
- page++;
152
- }
153
- } while (results.hasNext());
145
+
154
146
  }
155
147
 
156
148
  async function aggregateJobsByFieldToCMS({ field, collection }) {
@@ -233,7 +225,6 @@ async function referenceJobsToField({ referenceField, sourceCollection, jobField
233
225
  }
234
226
 
235
227
  function fetchJobLocation(jobDetails) {
236
- console.log('jobDetails.location is ', jobDetails.location);
237
228
  const isZeroLocation =
238
229
  jobDetails.location.latitude === '0.0000' && jobDetails.location.longitude === '0.0000';
239
230
  const jobLocation = {
@@ -1,17 +1,16 @@
1
- const { COLLECTIONS,QUERY_MAX_LIMIT} = require('./consts');
2
1
  const { items: wixData } = require('@wix/data');
3
2
 
4
3
  async function getAllPositions() {
5
4
  return wixData
6
- .query(COLLECTIONS.JOBS)
7
- .limit(QUERY_MAX_LIMIT)
5
+ .query('Jobs1')
6
+ .limit(1000)
8
7
  .find()
9
8
  .then(result => result.items);
10
9
  }
11
10
 
12
11
  async function getPositionsByField(field, value) {
13
12
  return wixData
14
- .query(COLLECTIONS.JOBS)
13
+ .query('Jobs1')
15
14
  .eq(field, value)
16
15
  .find()
17
16
  .then(result => result.items);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.49",
3
+ "version": "1.7.51",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {