updated to work with apache proxying
This commit is contained in:
		
							parent
							
								
									1b7a32e3ec
								
							
						
					
					
						commit
						936305c88d
					
				| 
						 | 
				
			
			@ -118,7 +118,7 @@ def create_league():
 | 
			
		|||
 | 
			
		||||
### SOCKETS
 | 
			
		||||
 | 
			
		||||
thread2 = threading.Thread(target=socketio.run,args=(app,"0.0.0.0", "80"))
 | 
			
		||||
thread2 = threading.Thread(target=socketio.run,args=(app,"127.0.0.1", "8080"))
 | 
			
		||||
thread2.start()
 | 
			
		||||
 | 
			
		||||
master_games_dic = {} #key timestamp : (game game, {} state)
 | 
			
		||||
| 
						 | 
				
			
			@ -133,7 +133,10 @@ def update_loop():
 | 
			
		|||
    global socket_thread
 | 
			
		||||
    while True:
 | 
			
		||||
        if socket_thread is not None:
 | 
			
		||||
            try:
 | 
			
		||||
                socket_thread.join()
 | 
			
		||||
            except:
 | 
			
		||||
                pass
 | 
			
		||||
        game_states = []
 | 
			
		||||
        game_ids = iter(master_games_dic.copy().keys())
 | 
			
		||||
        for game_id in game_ids:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,7 @@ import weather
 | 
			
		|||
 | 
			
		||||
data_dir = "data"
 | 
			
		||||
config_filename = os.path.join(data_dir, "config.json")
 | 
			
		||||
app = main_controller.app
 | 
			
		||||
 | 
			
		||||
class Command:
 | 
			
		||||
    def isauthorized(self, user):
 | 
			
		||||
| 
						 | 
				
			
			@ -718,7 +719,7 @@ class DraftFlagsCommand(Command):
 | 
			
		|||
    async def execute(self, msg, command, flags):
 | 
			
		||||
        text = """Currently accepted flags:
 | 
			
		||||
--draftsize or -d: Sets the size of each draft pool.
 | 
			
		||||
--minsize or -m: Sets the size at which the pool completely refreshes.
 | 
			
		||||
--refresh or -r: Sets the size at which the pool completely refreshes.
 | 
			
		||||
--teamsize or -t: How big each team should be, including pitchers.
 | 
			
		||||
--pitchercount or -p: How many pitchers each team should have.
 | 
			
		||||
--wait or -w: Sets the timeout, in seconds, to wait for draftees to pick a player.
 | 
			
		||||
| 
						 | 
				
			
			@ -1692,6 +1693,10 @@ active_standings = {}
 | 
			
		|||
setupmessages = {}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
thread1 = threading.Thread(target=main_controller.update_loop)
 | 
			
		||||
thread1.start()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
thread1 = threading.Thread(target=main_controller.update_loop)
 | 
			
		||||
thread1.start()
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue