Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading only new submissions #26

Open
mkaranja opened this issue Sep 24, 2020 · 0 comments
Open

Downloading only new submissions #26

mkaranja opened this issue Sep 24, 2020 · 0 comments

Comments

@mkaranja
Copy link

Hi,
I have a cron-job script running every day and it's starts by download the data from ona. Data is downloaded as a whole set(4848 Records) which consumes lots of memory and may time out which in turn terminates the script.
Is it possible to implement download of only new submissions? I'm thinking of a function to count number of records and can be used to subset data and only download a subset.

Example,
previousNumberOfRecords <- numberOfSubmissions() # saved on disk
currentNumberOfRecords <- numberOfSubmissions()

onaDownload(formID, account, user, password)[previousNumberOfRecords:currentNumberOfRecords,]

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant