abmp-npm 10.0.63 → 10.0.64

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/jobs.js CHANGED
@@ -2,6 +2,7 @@ const { taskManager } = require('psdev-task-manager');
2
2
 
3
3
  const { MEMBER_ACTIONS } = require('./daily-pull/consts');
4
4
  const { TASKS_NAMES } = require('./tasks/consts');
5
+ const { dailyPullExecutionCheck } = require('./tasks/daily-pull-check-methods');
5
6
  const { TASKS } = require('./tasks/tasks-configs');
6
7
 
7
8
  async function runScheduledTasks() {
@@ -96,17 +97,13 @@ async function scheduleFixUrlsWithSpacesTask() {
96
97
  }
97
98
  }
98
99
 
99
- async function scheduleDailyPullExecutionCheckTask() {
100
+ async function runDailyPullExecutionCheck() {
100
101
  try {
101
- console.log('scheduleDailyPullExecutionCheck started!');
102
- return await taskManager().schedule({
103
- name: TASKS_NAMES.scheduleDailyPullExecutionCheck,
104
- data: {},
105
- type: 'scheduled',
106
- });
102
+ console.log('runDailyPullExecutionCheck started!');
103
+ return await dailyPullExecutionCheck({});
107
104
  } catch (error) {
108
- console.error(`Failed to scheduleDailyPullExecutionCheck: ${error.message}`);
109
- throw new Error(`Failed to scheduleDailyPullExecutionCheck: ${error.message}`);
105
+ console.error(`Failed to runDailyPullExecutionCheck: ${error.message}`);
106
+ throw new Error(`Failed to runDailyPullExecutionCheck: ${error.message}`);
110
107
  }
111
108
  }
112
109
 
@@ -129,5 +126,5 @@ module.exports = {
129
126
  scheduleCreateContactsFromMembersTask,
130
127
  scheduleFixPrimaryAddressForMembersTask,
131
128
  scheduleFixUrlsWithSpacesTask,
132
- scheduleDailyPullExecutionCheckTask,
129
+ runDailyPullExecutionCheck,
133
130
  };
@@ -22,7 +22,6 @@ const TASKS_NAMES = {
22
22
  fixPrimaryAddressChunk: 'fixPrimaryAddressChunk',
23
23
  scheduleFixUrlsWithSpaces: 'scheduleFixUrlsWithSpaces',
24
24
  fixUrlsWithSpacesChunk: 'fixUrlsWithSpacesChunk',
25
- scheduleDailyPullExecutionCheck: 'scheduleDailyPullExecutionCheck',
26
25
  dailyPullExecutionCheck: 'dailyPullExecutionCheck',
27
26
  };
28
27
 
@@ -14,23 +14,6 @@ const getActionsToCheck = includeNone =>
14
14
  ? Object.values(MEMBER_ACTIONS)
15
15
  : Object.values(MEMBER_ACTIONS).filter(action => action !== MEMBER_ACTIONS.NONE);
16
16
 
17
- /**
18
- * Schedules an execution check for daily pull status.
19
- */
20
- async function scheduleDailyPullExecutionCheck() {
21
- try {
22
- console.log('scheduleDailyPullExecutionCheck started!');
23
- return await taskManager().schedule({
24
- name: TASKS_NAMES.dailyPullExecutionCheck,
25
- data: { hoursBack: DEFAULT_HOURS_BACK, includeNone: false },
26
- type: 'scheduled',
27
- });
28
- } catch (error) {
29
- console.error(`Failed to scheduleDailyPullExecutionCheck: ${error.message}`);
30
- throw new Error(`Failed to scheduleDailyPullExecutionCheck: ${error.message}`);
31
- }
32
- }
33
-
34
17
  /**
35
18
  * Verifies ScheduleMembersDataPerAction tasks exist and succeeded per action.
36
19
  */
@@ -101,6 +84,5 @@ async function dailyPullExecutionCheck(taskData) {
101
84
  }
102
85
 
103
86
  module.exports = {
104
- scheduleDailyPullExecutionCheck,
105
87
  dailyPullExecutionCheck,
106
88
  };
@@ -6,5 +6,5 @@ module.exports = {
6
6
  ...require('./url-migration-methods'),
7
7
  ...require('./address-primary-methods'),
8
8
  ...require('./url-space-fix-methods'),
9
- ...require('./daily-pull-backup-check-methods'),
9
+ ...require('./daily-pull-check-methods'),
10
10
  };
@@ -9,10 +9,7 @@ const {
9
9
  fixPrimaryAddressChunk,
10
10
  } = require('./address-primary-methods');
11
11
  const { TASKS_NAMES } = require('./consts');
12
- const {
13
- scheduleDailyPullExecutionCheck,
14
- dailyPullExecutionCheck,
15
- } = require('./daily-pull-backup-check-methods');
12
+ const { dailyPullExecutionCheck } = require('./daily-pull-check-methods');
16
13
  const {
17
14
  scheduleTaskForEmptyAboutYouMembers,
18
15
  convertAboutYouHtmlToRichContent,
@@ -206,13 +203,6 @@ const TASKS = {
206
203
  shouldSkipCheck: () => false,
207
204
  estimatedDurationSec: 80,
208
205
  },
209
- [TASKS_NAMES.scheduleDailyPullExecutionCheck]: {
210
- name: TASKS_NAMES.scheduleDailyPullExecutionCheck,
211
- getIdentifier: () => 'SHOULD_NEVER_SKIP',
212
- process: scheduleDailyPullExecutionCheck,
213
- shouldSkipCheck: () => false,
214
- estimatedDurationSec: 30,
215
- },
216
206
  [TASKS_NAMES.dailyPullExecutionCheck]: {
217
207
  name: TASKS_NAMES.dailyPullExecutionCheck,
218
208
  getIdentifier: task => task.data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abmp-npm",
3
- "version": "10.0.63",
3
+ "version": "10.0.64",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "check-cycles": "madge --circular .",