|
@@ -164,7 +164,7 @@ Also, append misspelled players to batch_update_list to autofix on next push if
|
|
def cleanPlayers(all_values, first_row, last_row, batch_update_list):
|
|
def cleanPlayers(all_values, first_row, last_row, batch_update_list):
|
|
players_unique = []
|
|
players_unique = []
|
|
for row_num, row in enumerate(all_values, start=1):
|
|
for row_num, row in enumerate(all_values, start=1):
|
|
- if first_row <= row_num < last_row:
|
|
+ if first_row <= row_num <= last_row:
|
|
player = row[2]
|
|
player = row[2]
|
|
if player[-7:] != "-FIX!!!" and player != "":
|
|
if player[-7:] != "-FIX!!!" and player != "":
|
|
if len(players.find_players_by_full_name(player)) > 0:
|
|
if len(players.find_players_by_full_name(player)) > 0:
|
|
@@ -290,8 +290,8 @@ def batchUpdate(batch_update_list):
|
|
if len(batch_update_list) > 1:
|
|
if len(batch_update_list) > 1:
|
|
worksheet.batch_update(batch_update_list, value_input_option="USER_ENTERED")
|
|
worksheet.batch_update(batch_update_list, value_input_option="USER_ENTERED")
|
|
else:
|
|
else:
|
|
- print('No update needed')
|
|
+ print('No update needed, sleeping for 1 minute')
|
|
- time.sleep(30)
|
|
+ time.sleep(60)
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|