GuillaumeSalouHF HF staff commited on
Commit
b6a787a
·
1 Parent(s): 9f779c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -23,21 +23,9 @@ def get_datasetdata(dataset_path):
23
  def sync_rooms_to_dataset():
24
  for room_data_db in get_db(ROOMS_DATA_DB):
25
 
26
- except Exception as e:
27
- print(e)
28
- continue
29
-
30
- objects += results
31
- room_data_db.commit()
32
-
33
- all_rows = [dict(row) for row in room_data_db.execute(
34
- "SELECT * FROM rooms_data WHERE room_id = ?", (room_id,)).fetchall()]
35
- data_path = S3_DATA_FOLDER / f"{room_id}.json"
36
- with open(data_path, 'w') as f:
37
- json.dump(all_rows, f, separators=(',', ':'))
38
  print("Updating repository")
39
  subprocess.Popen(
40
- "git add . && git commit --amend -m 'update' && git push --force", cwd=S3_DATA_FOLDER, shell=True)
41
 
42
 
43
  app = FastAPI()
 
23
  def sync_rooms_to_dataset():
24
  for room_data_db in get_db(ROOMS_DATA_DB):
25
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  print("Updating repository")
27
  subprocess.Popen(
28
+ "git add . && git commit --amend -m 'update' && git push --force", shell=True)
29
 
30
 
31
  app = FastAPI()