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

Starting sync automatically? #419

Open
jonatanmindroad opened this issue Oct 29, 2024 · 5 comments
Open

Starting sync automatically? #419

jonatanmindroad opened this issue Oct 29, 2024 · 5 comments

Comments

@jonatanmindroad
Copy link
Contributor

Is there a preferred way to sync datasets automatically? The use case would be for the dashboard to handle data that is continuously being uploaded.

I am considering extending the django container with a cronjob that calls python manage.py syncdataset periodically. But perhaps there is another obvious way to do this.

Any ideas?

@joefutrelle
Copy link
Contributor

The sync_bin endpoint is used in this example script for periodically transferring data from an IFCB and syncing the bins to the dashboard.

https://github.com/WHOIGit/ifcbdb/blob/master/utilities/auto_transfer.py

@jonatanmindroad
Copy link
Contributor Author

I looked into the included script, but in the end I went with my original idea.

If anyone else want to do the same I can give some notes. It turned out that cronjobs inside containers has its own challenges.

@TomAkaTma
Copy link

Hi @jonatanmindroad , any notes would be greatly appreciated - I'm about to try and do exactly the same thing. Thanks!

@jonatanmindroad
Copy link
Contributor Author

jonatanmindroad commented Nov 18, 2024

@TomAkaTma Sorry for not answering earlier, I've been away. I can share the solution in full but I just want to sort out an issue with it first. The sync did not work as I intended when I was away and I want to figure out why.

EDIT: Found and fixed the error. Now it works as expected.

@jonatanmindroad
Copy link
Contributor Author

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

3 participants