Skip to content

Commit 93ce9aa

Browse files
committed
backups, us.pycon.org integration done
1 parent 6d8d9ab commit 93ce9aa

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

TODO.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
- [x] Clean up the menu bar in batch
2323
- [x] batch hide your groups from yourself
2424
- [x] Turn emailing back on
25-
- [ ] Backups
26-
- [ ] Integrate with us.pycon.org
25+
- [x] Backups
26+
- [x] Integrate with us.pycon.org
2727
- [ ] Email reminders/updates to committee members
28+
- [ ] Handle withdrawn talks
2829
- [ ] ~~Analysis export~~ (Just SQL query it)
2930
- [ ] ~~Remove random chat from talks~~ (Leave chat on talks)
3031
- [ ] ~~batch group tweaking UI~~ (Do it before import)

deployment/backup-cron

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
sudo -u postgres /usr/bin/pg_dump progcom > /opt/progcom-backup/progcom-db-`date -Ihours`
4+
5+
/opt/tarsnap/bin/tarsnap -c --keyfile /root/tarsnap.key --cachedir /opt/progcom-backup-cache -f progcom-db-`date +%Y-%m-%d_%H-%M-%S` /opt/progcom-backup && curl https://nosnch.in/0540fdd2ae &> /dev/null

deployment/prod.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- libpq-dev
2020
- libffi-dev
2121
- python-psycopg2
22+
- e2fslibs-dev
2223

2324

2425
#Basic service
@@ -58,6 +59,11 @@
5859
- postgresql_user: name=progcom password=progcom role_attr_flags=NOSUPERUSER
5960
sudo_user: postgres
6061

62+
#Backup (Installed tarsnap by hand with `./configure #--prefix=/opt/tarsnap`)
63+
- file: path=/opt/progcom-backup state=directory
64+
- file: path=/opt/progcom-backup-cache state=directory
65+
- template: src=backup-cron dest=/etc/cron.daily/progcom-backups
66+
mode=0744
6167

6268
handlers:
6369
- name: restart nginx

pull_updates.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@ def fetch_talk(id):
4343
rv = api_call('/2016/pycon_api/proposals/{}/'.format(id))['data']
4444
rv['authors'] = rv['speakers']
4545
del rv['speakers']
46-
print rv['authors']
4746
rv.update(rv['details'])
4847
del rv['details']
49-
rv['category'] = 'PLACEHOLDER'#TODO
50-
rv['additional_requirements'] = 'PLACEHOLDER'#TODO
5148
return rv
5249

5350
def main():

0 commit comments

Comments
 (0)