mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix index creation (#197)
This commit is contained in:
1 parent
62dbd0beb8
commit
f5c63e02ce
4 files changed
+10
-6
No files matched your search
@@ -69,7 +69,10 @@ class WorkerService implements BaseService {
|
||||
async (doc) => {
|
||||
try {
|
||||
logger.debug('Worker task: %o', doc);
|
||||
const start = Date.now();
|
||||
await this.handlers[doc.subType](doc);
|
||||
const spent = Date.now() - start;
|
||||
if (spent > 500) logger.warn('Slow worker task (%d ms): %s', spent, doc);
|
||||
} catch (e) {
|
||||
logger.error('Worker task fail: ', e);
|
||||
logger.error('%o', doc);
|
||||
|
||||
Reference in new issue
Block a user