OpenFn / wcs-wildmeat

Wildlife Conservation Society ConSocSci Project
1 stars 0 forks source link

Add cursor to jobs/fetch-rc-submissions.js #8

Closed taylordowns2000 closed 3 years ago

taylordowns2000 commented 3 years ago

Please see line 65 of jobs/fetch-rc-submissions.js, and how state.lastEnd is passed into line 17 of subsequent runs. Currently, the final alterState operation does not properly set a lastEnd. Please debug this and get lastEnd to work as expected.

(Please note @aleksa-krolls , @lakhassane , that right now, it's fairly useful to always fetch all three submissions in this test DB since we're still testing jobs/rural-consumption-to-postgres.js. Once you hook up the cursor, you'll need to clear state each time you want to see those 3 original forms again.)

lakhassane commented 3 years ago

@taylordowns2000 from logging the execution, alterState is actually setting a lastEnd. However, it is set in the output.json and not the kobostate.json (which is the input). Thus it won't be visible in the future runs since we are using the same version of kobostate.json

This is the bottom end of output.json image

taylordowns2000 commented 3 years ago

output.json is the input for the next run for a cron-triggered job on OpenFn.org. Is this cursor now working on OpenFn.org?

On Wed, Sep 9, 2020 at 8:51 AM lakhassane notifications@github.com wrote:

@taylordowns2000 https://github.com/taylordowns2000 from logging the execution, alterState is actually setting a lastEnd. However, it is set in the output.json and not the kobostate.json (which is the input). Thus it won't be visible in the future runs since we are using the same version of kobostate.json

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenFn/wcs-consocsci/issues/8#issuecomment-689541693, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCUBLOWCB7PWHWWO5I3MW3SE524LANCNFSM4Q7DLUXQ .

-- Taylor Downs | Head of Product Open Function Group https://www.openfn.org/ | How Data Integration Makes ICT4D Work https://youtu.be/GVB9voGp6T4