@xuda.io/account_module 1.2.2049 → 1.2.2051
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/index.mjs +6 -14
- package/index_ms.mjs +6 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -50,6 +50,7 @@ const email_ms = await import(`${module_path}/email_module/index_ms.mjs`);
|
|
|
50
50
|
const marketplace_ms = await import(`${module_path}/marketplace_module/index_ms.mjs`);
|
|
51
51
|
const stripe_ms = await import(`${module_path}/stripe_module/index_ms.mjs`);
|
|
52
52
|
const logs_ms = await import(`${module_path}/logs_module/index_ms.mjs`);
|
|
53
|
+
const ws_dashboard_ms = await import(`${module_path}/ws_dashboard_module/index_ms.mjs`);
|
|
53
54
|
|
|
54
55
|
export const update_account_info = async function (req, job_id, headers) {
|
|
55
56
|
const { uid } = req;
|
|
@@ -2603,20 +2604,11 @@ export const unpin_contact = async function (req) {
|
|
|
2603
2604
|
|
|
2604
2605
|
const contact_save_ret = await save_contact(uid, contact_doc);
|
|
2605
2606
|
|
|
2606
|
-
|
|
2607
|
-
'
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
data: {
|
|
2612
|
-
service: 'contact_unpinned',
|
|
2613
|
-
to: [uid],
|
|
2614
|
-
data: await get_contact_info(uid, null, contact_id),
|
|
2615
|
-
},
|
|
2616
|
-
}),
|
|
2617
|
-
),
|
|
2618
|
-
);
|
|
2619
|
-
|
|
2607
|
+
ws_dashboard_ms.emit_message_to_dashboard({
|
|
2608
|
+
service: 'contact_unpinned',
|
|
2609
|
+
to: [uid],
|
|
2610
|
+
data: await get_contact_info(uid, null, contact_id),
|
|
2611
|
+
});
|
|
2620
2612
|
return contact_save_ret;
|
|
2621
2613
|
} catch (err) {
|
|
2622
2614
|
return {
|
package/index_ms.mjs
CHANGED
|
@@ -46,7 +46,7 @@ const send_to_queue =async function(ms_method, ...args) {
|
|
|
46
46
|
const timeout = setTimeout(() => {
|
|
47
47
|
delete queue[queue_id];
|
|
48
48
|
reject(new Error(`Queue timeout for ${ms_method}`));
|
|
49
|
-
},
|
|
49
|
+
}, 300000); // 300 second timeout
|
|
50
50
|
|
|
51
51
|
// Wrap resolve to clean up
|
|
52
52
|
queue[queue_id].resolve = (value) => {
|
|
@@ -61,7 +61,8 @@ const send_to_queue =async function(ms_method, ...args) {
|
|
|
61
61
|
delete queue[queue_id];
|
|
62
62
|
reject(error);
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
try{
|
|
65
66
|
global[`_${global.module_in}_ch`].sendToQueue(
|
|
66
67
|
'account_module',
|
|
67
68
|
Buffer.from(
|
|
@@ -74,6 +75,9 @@ const send_to_queue =async function(ms_method, ...args) {
|
|
|
74
75
|
)
|
|
75
76
|
);
|
|
76
77
|
|
|
78
|
+
}catch(err){
|
|
79
|
+
debugger
|
|
80
|
+
}
|
|
77
81
|
})
|
|
78
82
|
|
|
79
83
|
};
|