abmp-npm 1.10.10 → 1.10.12

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.
@@ -134,7 +134,7 @@ const TASKS = {
134
134
  },
135
135
  [TASKS_NAMES.migrateUrlsChunk]: {
136
136
  name: TASKS_NAMES.migrateUrlsChunk,
137
- getIdentifier: task => `chunk-${task.data.chunkIndex}`,
137
+ getIdentifier: task => task.data,
138
138
  process: migrateUrlsChunk,
139
139
  shouldSkipCheck: () => false,
140
140
  estimatedDurationSec: 80,
@@ -148,7 +148,7 @@ const TASKS = {
148
148
  },
149
149
  [TASKS_NAMES.generateUrlsChunk]: {
150
150
  name: TASKS_NAMES.generateUrlsChunk,
151
- getIdentifier: task => `chunk-${task.data.chunkIndex}`,
151
+ getIdentifier: task => task.data,
152
152
  process: generateUrlsChunk,
153
153
  shouldSkipCheck: () => false,
154
154
  estimatedDurationSec: 80,
@@ -3,7 +3,7 @@ const { taskManager } = require('psdev-task-manager');
3
3
  const { COLLECTIONS } = require('../../public/consts');
4
4
  const { ensureUniqueUrl } = require('../daily-pull/process-member-methods');
5
5
  const { wixData } = require('../elevated-modules');
6
- // const { bulkSaveMembers } = require('../members-data-methods');
6
+ const { bulkSaveMembers } = require('../members-data-methods');
7
7
  const { queryAllItems, chunkArray } = require('../utils');
8
8
 
9
9
  const { TASKS_NAMES } = require('./consts');
@@ -83,10 +83,9 @@ async function scheduleMigrateExistingUrls() {
83
83
  */
84
84
  async function migrateUrlsChunk(data) {
85
85
  const { urlData, chunkIndex, totalChunks } = data;
86
- console.log('migrateUrlsChunk data', data);
87
- // console.log(
88
- // `Processing migration chunk ${chunkIndex + 1}/${totalChunks} (${urlData.length} members)`
89
- // );
86
+ console.log(
87
+ `Processing migration chunk ${chunkIndex + 1}/${totalChunks} (${urlData.length} members)`
88
+ );
90
89
 
91
90
  const result = {
92
91
  successful: 0,
@@ -146,8 +145,7 @@ async function migrateUrlsChunk(data) {
146
145
  );
147
146
 
148
147
  try {
149
- // keep bulk save as comment for now, since we are just testing the query and update logic
150
- // await bulkSaveMembers(membersToUpdate);
148
+ await bulkSaveMembers(membersToUpdate);
151
149
  result.successful += membersToUpdate.length;
152
150
  console.log(`✅ Successfully updated ${membersToUpdate.length} members`);
153
151
  } catch (error) {
@@ -335,8 +333,7 @@ async function generateUrlsChunk(data) {
335
333
  );
336
334
 
337
335
  try {
338
- // keep bulk save as comment for now, since we are just testing the query and update logic
339
- // await bulkSaveMembers(membersToUpdate);
336
+ await bulkSaveMembers(membersToUpdate);
340
337
  result.successful += membersToUpdate.length;
341
338
  console.log(`✅ Successfully updated ${membersToUpdate.length} members`);
342
339
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abmp-npm",
3
- "version": "1.10.10",
3
+ "version": "1.10.12",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "check-cycles": "madge --circular .",