sr-npm 1.7.547 → 1.7.549
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 +12 -12
- package/package.json +1 -1
package/backend/data.js
CHANGED
|
@@ -57,9 +57,9 @@ function getCustomFieldsAndValuesFromPosition(position,customFieldsLabels,custom
|
|
|
57
57
|
for (const field of customFieldsArray) {
|
|
58
58
|
if(field.fieldLabel==="Country" || field.fieldLabel==="Department" || field.fieldLabel==="Brands") continue; //country and department are not custom fields, they are already in the job object
|
|
59
59
|
const label = field.fieldLabel
|
|
60
|
-
const fieldId=field.fieldId
|
|
61
|
-
const fieldLabel =
|
|
62
|
-
const valueId=field.valueId
|
|
60
|
+
const fieldId=normalizeString(field.fieldId)
|
|
61
|
+
const fieldLabel = label;
|
|
62
|
+
const valueId=normalizeString(field.valueId)
|
|
63
63
|
const valueLabel = field.valueLabel
|
|
64
64
|
customFieldsLabels[fieldId] = fieldLabel
|
|
65
65
|
// Build nested dictionary: fieldId -> { valueId: valueLabel }
|
|
@@ -150,7 +150,7 @@ async function saveJobsDataToCMS() {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
await insertValuesReference(jobToCustomValues);
|
|
153
|
-
await
|
|
153
|
+
await insertJobsReference(jobToCustomValues);
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
console.log(`✓ All chunks processed. Total jobs saved: ${totalSaved}/${jobsData.length}`);
|
|
@@ -427,16 +427,16 @@ async function syncJobsFast() {
|
|
|
427
427
|
console.log("Syncing jobs fast");
|
|
428
428
|
await createCollections();
|
|
429
429
|
await clearCollections();
|
|
430
|
-
|
|
430
|
+
await fillSecretManagerMirror();
|
|
431
431
|
console.log("saving jobs data to CMS");
|
|
432
432
|
await saveJobsDataToCMS();
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
433
|
+
console.log("saved jobs data to CMS successfully");
|
|
434
|
+
console.log("saving jobs descriptions and location apply url to CMS");
|
|
435
|
+
await saveJobsDescriptionsAndLocationApplyUrlToCMS();
|
|
436
|
+
console.log("saved jobs descriptions and location apply url to CMS successfully");
|
|
437
|
+
await aggregateJobs();
|
|
438
|
+
await referenceJobs();
|
|
439
|
+
console.log("syncing jobs fast finished successfully");
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
async function clearCollections() {
|