bulltrackers-module 1.0.52 → 1.0.53
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.
|
@@ -34,7 +34,7 @@ class IntelligentProxyManager {
|
|
|
34
34
|
this.PROXIES_COLLECTION = config.proxiesCollectionName;
|
|
35
35
|
this.PERFORMANCE_DOC_PATH = config.proxyPerformanceDocPath;
|
|
36
36
|
// NEW: Check for the locking enabled flag, default to true
|
|
37
|
-
this.proxyLockingEnabled =
|
|
37
|
+
this.proxyLockingEnabled = config.proxyLockingEnabled !== false;
|
|
38
38
|
|
|
39
39
|
// Internal state
|
|
40
40
|
this.proxies = {}; // Stores { owner, url, status ('unlocked', 'locked') }
|
|
@@ -29,7 +29,7 @@ async function handleDiscover(task, taskId, dependencies, config) {
|
|
|
29
29
|
// Use the proxyManager from dependencies
|
|
30
30
|
const response = await proxyManager.fetch(url, {
|
|
31
31
|
method: 'POST',
|
|
32
|
-
headers: { ...selectedHeader.
|
|
32
|
+
headers: { ...selectedHeader.header, 'Content-Type': 'application/json' },
|
|
33
33
|
body: JSON.stringify(cids),
|
|
34
34
|
});
|
|
35
35
|
if (!response.ok) {
|
|
@@ -27,7 +27,7 @@ async function handleUpdate(task, taskId, dependencies, config) {
|
|
|
27
27
|
logger.log('INFO', `[UPDATE] Fetching portfolio for user ${userId} (${userType} with url ${url})`);
|
|
28
28
|
|
|
29
29
|
// Use proxyManager from dependencies
|
|
30
|
-
const response = await proxyManager.fetch(url, { headers: selectedHeader.
|
|
30
|
+
const response = await proxyManager.fetch(url, { headers: selectedHeader.header });
|
|
31
31
|
|
|
32
32
|
if (!response || typeof response.text !== 'function') {
|
|
33
33
|
logger.log('ERROR', `[UPDATE] Invalid or incomplete response received for user ${userId}`, { response });
|
|
@@ -34,7 +34,7 @@ async function handleVerify(task, taskId, dependencies, config) {
|
|
|
34
34
|
let wasSuccess = false;
|
|
35
35
|
try {
|
|
36
36
|
// Use proxyManager from dependencies
|
|
37
|
-
const response = await proxyManager.fetch(portfolioUrl, { headers: selectedHeader.
|
|
37
|
+
const response = await proxyManager.fetch(portfolioUrl, { headers: selectedHeader.header });
|
|
38
38
|
if (!response.ok) continue;
|
|
39
39
|
wasSuccess = true;
|
|
40
40
|
|