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

Set up CRON for offline export #1698

Closed
1 task
Tracked by #2069
teolemon opened this issue Mar 9, 2019 · 4 comments
Closed
1 task
Tracked by #2069

Set up CRON for offline export #1698

teolemon opened this issue Mar 9, 2019 · 4 comments
Assignees
Labels

Comments

@teolemon
Copy link
Member

teolemon commented Mar 9, 2019

What

  • Set up CRON for offline export

Part of

@hangy
Copy link
Member

hangy commented Mar 9, 2019

Set up CRON for offline export

Offline export of what? There already is

#!/bin/sh
cd /srv/off/scripts
./remove_empty_products.pl
#./compute_missions.pl
./export_database.pl
./mongodb_dump.sh /srv/off/html openfoodfacts 10.0.0.2 off
cd /srv/off/html/data
gzip < en.openfoodfacts.org.products.rdf > en.openfoodfacts.org.products.rdf.gz
gzip < fr.openfoodfacts.org.products.rdf > fr.openfoodfacts.org.products.rdf.gz
gzip < en.openfoodfacts.org.products.csv > en.openfoodfacts.org.products.csv.gz
gzip < fr.openfoodfacts.org.products.csv > fr.openfoodfacts.org.products.csv.gz

Or is this about adding the crontab to GitHub, as requested in openfoodfacts/smooth-app#1673?

@stephanegigandet
Copy link
Contributor

I think it's the offline database for the app. @teolemon : where is the code that generates that export?

@teolemon
Copy link
Member Author

/home/teolemon/offline/generate_dump_for_offline_apps_off.py @stephanegigandet
It doesn't zip the file though.

@stephanegigandet
Copy link
Contributor

Which URL is the app requesting? There's a bunch of files in /srv/off/html/data/offline :

-rw-r--r-- 1 root root 37946313 Jan 7 17:46 fr.openfoodfacts.org.products.small.csv
-rw-r--r-- 1 root root 11524750 Jan 7 18:13 fr.openfoodfacts.org.products.small.csv.tgz
-rw-r--r-- 1 root root 11438258 Jan 11 10:23 fr.openfoodfacts.org.products.small.zip
-rw-r--r-- 1 root root 94373736 Feb 25 22:30 large.zip
-rw-r--r-- 1 root root 41454803 Mar 4 20:42 en.openfoodfacts.org.products.small.csv
-rw-r--r-- 1 root root 773612114 Mar 4 20:45 en.openfoodfacts.org.products.large.csv
-rw-r--r-- 1 root root 12347051 Mar 4 20:59 en.openfoodfacts.org.products.small.csv.zip

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

No branches or pull requests

3 participants