summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2020-10-08 23:53:10 +0200
committeremkael <emkael@tlen.pl>2020-10-08 23:53:10 +0200
commit98a458b8b72071e34de3dfd1e894fd98363fb268 (patch)
tree3125b30d1273e5b7dcb5e7479d83d463e1d73c17
parent99f3516002a145ffa678dd3f7902453d1eca3963 (diff)
On butler re-creation, force target and do not purge already calculated butler scores (allows rolling back to specified round/segment)
-rw-r--r--.envrcbin361 -> 364 bytes
-rw-r--r--Makefile2
-rw-r--r--butler/butler.py2
3 files changed, 1 insertions, 3 deletions
diff --git a/.envrc b/.envrc
index e495c83..ae05400 100644
--- a/.envrc
+++ b/.envrc
Binary files differ
diff --git a/Makefile b/Makefile
index 01be4ac..afb6e48 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ dumps: FORCE
s3cmd -c dumps/.s3config sync ${LIGA_S3_BUCKET} dumps/sync/
./dumps/load-dumps.sh
-butler: dumps
+butler: dumps FORCE
python butler/butler.py 1+2 | mysql ${LIGA_MYSQL_CONNECTION_OPTS}
python butler/butler.py 1 | mysql ${LIGA_MYSQL_CONNECTION_OPTS}
python butler/butler.py 2 | mysql ${LIGA_MYSQL_CONNECTION_OPTS}
diff --git a/butler/butler.py b/butler/butler.py
index 36022e0..333f503 100644
--- a/butler/butler.py
+++ b/butler/butler.py
@@ -67,8 +67,6 @@ print('UPDATE admin SET teamcnt=%d, butler=%d;' % (
print('UPDATE teams SET bye=2;')
-print('DELETE FROM butler;')
-
for table in ['boards', 'rounds']:
print('DELETE FROM %s;' % (table))
print('INSERT INTO %s SELECT * FROM %s.%s;' % (