mirror of
				https://git.wownero.com/lza_menace/suchwow.git
				synced 2024-08-15 01:03:19 +00:00 
			
		
		
		
	add create_accounts command for when refreshing prod db on dev
This commit is contained in:
		
							parent
							
								
									bc24c60ba4
								
							
						
					
					
						commit
						d29874a92d
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -53,6 +53,14 @@ def init():
 | 
			
		|||
    # init db
 | 
			
		||||
    db.create_tables([Post, Profile, Comment, Notification])
 | 
			
		||||
 | 
			
		||||
@app.cli.command("create_accounts")
 | 
			
		||||
def create_accounts():
 | 
			
		||||
    wallet = wownero.Wallet()
 | 
			
		||||
    for post in Post.select():
 | 
			
		||||
        if post.account_index not in wallet.accounts():
 | 
			
		||||
            account = wallet.new_account()
 | 
			
		||||
            print(f"Created account {account}")
 | 
			
		||||
 | 
			
		||||
@app.cli.command("payout_users")
 | 
			
		||||
def payout_users():
 | 
			
		||||
    wallet = wownero.Wallet()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue