Skip to content

Commit

Permalink
Merge pull request #2 from az0t0/hotfix-1.2.2
Browse files Browse the repository at this point in the history
Hotfix 1.2.2
  • Loading branch information
hgsanguk authored Oct 24, 2023
2 parents 1a1a4bb + 89c9d4b commit 41708a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/discordbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
tree = app_commands.CommandTree(bot)
global status
CRAWLING_PERIOD = 1
BOT_VERSION = 'v1.2.1'
BOT_VERSION = 'v1.2.2'
food_notification_time = [datetime.time(hour=i, minute=0,
tzinfo=datetime.timezone(datetime.timedelta(hours=9))) for i in range(9, 13)]
notice_crawling_time = [datetime.time(hour=i, minute=30,
Expand Down
4 changes: 2 additions & 2 deletions src/noticecrawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_notice(board_name, table_name):
continue
cur.execute('SELECT count(board_index) FROM ' + table_name)
count = cur.fetchall()[0][0]
while count > 200:
while count > 2000:
cur.execute('DELETE FROM ' + table_name + ' WHERE board_index = (SELECT min(board_index) FROM ' + table_name + ')')
count -= 1
return new_notice
Expand Down Expand Up @@ -62,7 +62,7 @@ def get_domi_notice():
continue
cur.execute('SELECT count(board_index) FROM Dormitory')
count = cur.fetchall()[0][0]
while count > 100:
while count > 1000:
cur.execute('DELETE FROM Dormitory WHERE board_index = (SELECT min(board_index) FROM Dormitory)')
count -= 1
return new_notice
Expand Down

0 comments on commit 41708a7

Please sign in to comment.