EIDA / wfcatalog

EIDA NG WFCatalog implementation
5 stars 8 forks source link

Fix c_segments processing #35

Closed andres-h closed 1 year ago

andres-h commented 1 year ago

When adding csegments=true to a request I get errors:

UnhandledPromiseRejectionWarning: TypeError: Mongo.collection is not a function
    at processDailyStream (/home/sysop/wfcatalog/service/server.js:750:23)
    at /home/sysop/wfcatalog/service/node_modules/mongodb/lib/utils.js:349:28
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

and

UnhandledPromiseRejectionWarning: TypeError: cCursor.nextObject is not a function
    at processDailyStream (/home/sysop/wfcatalog/service/server.js:757:15)
    at /home/sysop/wfcatalog/service/node_modules/mongodb/lib/utils.js:349:28
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

I'm not very familiar with node.js, but the current patch seems to fix this.

jbienkowski commented 1 year ago

Hi @andres-h, True, it seems I missed it when porting WFCat to the newer MongoDB version. Thanks!