sr-npm 1.7.563 → 1.7.564
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/consts.js +6 -19
- package/backend/data.js +3 -19
- package/package.json +1 -1
package/backend/consts.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
const {saveJobsDataToCMS,
|
|
1
|
+
const {saveJobsDataToCMS,saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS,createCollections,aggregateJobs,referenceJobs,syncJobsFast} = require('./data')
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
const QUERY_MAX_LIMIT = 1000;
|
|
5
5
|
|
|
6
6
|
const TASKS_NAMES = {
|
|
7
7
|
SYNC_JOBS: 'syncJobsFromSRAPIToCMS',
|
|
8
|
-
SYNC_JOBS_SPLITTED: 'syncJobsFromSRAPIToCMSSplitted',
|
|
9
8
|
INSERT_JOBS_TO_CMS: 'insertJobsToCMS',
|
|
10
|
-
|
|
9
|
+
INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS: 'insertJobsDescriptionsLocationApplyUrlReferencesToCMS',
|
|
11
10
|
AGGREGATE_JOBS_BY_FIELD_TO_CMS: 'aggregateJobsByFieldToCMS',
|
|
12
11
|
REFERENCE_JOBS: 'referenceJobs',
|
|
13
12
|
CREATE_COLLECTIONS: 'createCollections',
|
|
@@ -22,19 +21,7 @@ const TASKS = {
|
|
|
22
21
|
childTasks: [
|
|
23
22
|
{ name: TASKS_NAMES.CREATE_COLLECTIONS},
|
|
24
23
|
{ name: TASKS_NAMES.INSERT_JOBS_TO_CMS },
|
|
25
|
-
{ name: TASKS_NAMES.
|
|
26
|
-
{ name: TASKS_NAMES.AGGREGATE_JOBS_BY_FIELD_TO_CMS },
|
|
27
|
-
{name: TASKS_NAMES.REFERENCE_JOBS},
|
|
28
|
-
],
|
|
29
|
-
scheduleChildrenSequentially: true,
|
|
30
|
-
estimatedDurationSec: 60,
|
|
31
|
-
},
|
|
32
|
-
[TASKS_NAMES.SYNC_JOBS_SPLITTED]: {
|
|
33
|
-
name: TASKS_NAMES.SYNC_JOBS_SPLITTED,
|
|
34
|
-
childTasks: [
|
|
35
|
-
{ name: TASKS_NAMES.CREATE_COLLECTIONS},
|
|
36
|
-
{ name: TASKS_NAMES.INSERT_JOBS_TO_CMS },
|
|
37
|
-
{ name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_TO_CMS },
|
|
24
|
+
{ name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS },
|
|
38
25
|
{ name: TASKS_NAMES.AGGREGATE_JOBS_BY_FIELD_TO_CMS },
|
|
39
26
|
{name: TASKS_NAMES.REFERENCE_JOBS},
|
|
40
27
|
],
|
|
@@ -55,10 +42,10 @@ const TASKS = {
|
|
|
55
42
|
shouldSkipCheck:()=>false,
|
|
56
43
|
estimatedDurationSec:20
|
|
57
44
|
},
|
|
58
|
-
[TASKS_NAMES.
|
|
59
|
-
name: TASKS_NAMES.
|
|
45
|
+
[TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS]: {
|
|
46
|
+
name: TASKS_NAMES.INSERT_JOBS_DESCRIPTIONS_LOCATION_APPLY_URL_REFERENCES_TO_CMS,
|
|
60
47
|
getIdentifier:()=> "SHOULD_NEVER_SKIP",
|
|
61
|
-
process:
|
|
48
|
+
process:saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS,
|
|
62
49
|
shouldSkipCheck:()=>false,
|
|
63
50
|
estimatedDurationSec:20
|
|
64
51
|
},
|
package/backend/data.js
CHANGED
|
@@ -468,23 +468,8 @@ async function syncJobsFast() {
|
|
|
468
468
|
await referenceJobs();
|
|
469
469
|
console.log("syncing jobs fast finished successfully");
|
|
470
470
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
await createCollections();
|
|
474
|
-
await clearCollections();
|
|
475
|
-
await fillSecretManagerMirror();
|
|
476
|
-
console.log("saving jobs data to CMS");
|
|
477
|
-
await saveJobsDataToCMS();
|
|
478
|
-
console.log("saved jobs data to CMS successfully");
|
|
479
|
-
await aggregateJobs();
|
|
480
|
-
await referenceJobs();
|
|
481
|
-
console.log("syncing jobs fast finished successfully");
|
|
482
|
-
}
|
|
483
|
-
async function syncJobsDescriptionsAndLocationApplyUrlFastSplitted() {
|
|
484
|
-
console.log("Syncing jobs descriptions and location apply url and values references");
|
|
485
|
-
await saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS();
|
|
486
|
-
console.log("saved jobs descriptions and location apply url and values references successfully");
|
|
487
|
-
}
|
|
471
|
+
|
|
472
|
+
|
|
488
473
|
|
|
489
474
|
async function clearCollections() {
|
|
490
475
|
console.log("clearing collections");
|
|
@@ -543,8 +528,7 @@ module.exports = {
|
|
|
543
528
|
aggregateJobs,
|
|
544
529
|
createCollections,
|
|
545
530
|
saveJobsDataToCMS,
|
|
546
|
-
|
|
547
|
-
syncJobsDescriptionsAndLocationApplyUrlFastSplitted,
|
|
531
|
+
saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS,
|
|
548
532
|
aggregateJobsByFieldToCMS,
|
|
549
533
|
referenceJobsToField,
|
|
550
534
|
fillSecretManagerMirror,
|