Db transfer

new db is working, but redis not active yet. 
i've tried to automize the sql_q file (queries part) but it didnt work.. or it'd take more time.. also i didn't want to change the rest of the code a lot.. 
why check to see if json_result here? You're already calling methods on json_result and looking up values in it on lines 222, 224-226. If json_result is None than you would have already encountered an exception by now.