Skip to content

Commit 88bc6eb

Browse files
committed
fix(queue): debug info)
1 parent b92c164 commit 88bc6eb

File tree

3 files changed

+1662
-19
lines changed

3 files changed

+1662
-19
lines changed

src/services/QueueManager/QueueManager.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ const strategies = {
5959
external: new QueueStrategy(
6060
{
6161
db: { timeout: 5000, maxConcurrentExecutions: 999 },
62-
node: { timeout: 60 * 1000, maxConcurrentExecutions: 50 },
62+
node: { timeout: 60 * 1000, maxConcurrentExecutions: 30 },
6363
gateway: { timeout: 21000, maxConcurrentExecutions: 11 },
6464
},
6565
['db', 'node', 'gateway']
6666
),
6767
embedded: new QueueStrategy(
6868
{
6969
db: { timeout: 5000, maxConcurrentExecutions: 999 },
70-
node: { timeout: 60 * 1000, maxConcurrentExecutions: 50 },
70+
node: { timeout: 60 * 1000, maxConcurrentExecutions: 30 },
7171
gateway: { timeout: 21000, maxConcurrentExecutions: 11 },
7272
},
7373
['db', 'gateway', 'node']
@@ -130,12 +130,16 @@ class QueueManager {
130130
const executeCount =
131131
settings.maxConcurrentExecutions -
132132
this.executing[queueSource as IpfsContentSource].size;
133-
134133
const itemsByPriority = items
135134
.sort(
136135
(a, b) => getQueueItemTotalPriority(b) - getQueueItemTotalPriority(a)
137136
)
138137
.slice(0, executeCount);
138+
console.log(
139+
`----q ${queueSource} ${
140+
this.executing[queueSource as IpfsContentSource].size
141+
}/${settings.maxConcurrentExecutions} `
142+
);
139143

140144
// console.log('---itemsByPriority', itemsByPriority);
141145

src/services/backend/workers/background/worker.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ const createBackgroundWorkerApi = () => {
9292
if (!mlInstances[name]) {
9393
// broadcastApi.postServiceStatus('ml', 'starting');
9494
const model = mlModelMap[name];
95-
console.log('-----------init ml pipeline');
9695

9796
return pipeline(model.name, model.model, {
9897
progress_callback: (progressData: any) => {
@@ -162,7 +161,6 @@ const createBackgroundWorkerApi = () => {
162161
const syncService = new SyncService(serviceDeps, particlesResolver);
163162
const initMl = async () => {
164163
broadcastApi.postServiceStatus('ml', 'starting');
165-
console.log('-----------init ml starting');
166164

167165
return Promise.all([
168166
initMlInstance('featureExtractor'),

0 commit comments

Comments
 (0)