Update sync_data.sh
Browse files- sync_data.sh +2 -1
sync_data.sh
CHANGED
@@ -22,7 +22,7 @@ if backup_files:
|
|
22 |
latest = backup_files[-1]
|
23 |
print(f'Found backup: {latest}, downloading...')
|
24 |
api.hf_hub_download(repo_id='${DATASET_ID}', filename=latest, repo_type='dataset', local_dir='/tmp')
|
25 |
-
os.system(f'tar -xzf /tmp/{latest} -C /app
|
26 |
os.remove(f'/tmp/{latest}')
|
27 |
print(f'Successfully restored from {latest}')
|
28 |
else:
|
@@ -30,6 +30,7 @@ else:
|
|
30 |
"
|
31 |
}
|
32 |
|
|
|
33 |
sync_data() {
|
34 |
echo "Waiting ${SYNC_INTERVAL:-7200} seconds before first backup..."
|
35 |
sleep ${SYNC_INTERVAL:-7200}
|
|
|
22 |
latest = backup_files[-1]
|
23 |
print(f'Found backup: {latest}, downloading...')
|
24 |
api.hf_hub_download(repo_id='${DATASET_ID}', filename=latest, repo_type='dataset', local_dir='/tmp')
|
25 |
+
os.system(f'tar -xzf /tmp/{latest} -C /app')
|
26 |
os.remove(f'/tmp/{latest}')
|
27 |
print(f'Successfully restored from {latest}')
|
28 |
else:
|
|
|
30 |
"
|
31 |
}
|
32 |
|
33 |
+
|
34 |
sync_data() {
|
35 |
echo "Waiting ${SYNC_INTERVAL:-7200} seconds before first backup..."
|
36 |
sleep ${SYNC_INTERVAL:-7200}
|