forked from MarseyWorld/MarseyWorld
try random shit to fix posting in WPD
parent
ac8d2159e9
commit
12fbd8da83
|
@ -1157,5 +1157,5 @@ GIRL_NAMES = {
|
||||||
from sqlalchemy.engine.create import create_engine
|
from sqlalchemy.engine.create import create_engine
|
||||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||||
|
|
||||||
engine = create_engine(environ.get("DATABASE_URL").strip(), connect_args={"options": "-c statement_timeout=5000 -c idle_in_transaction_session_timeout=40000"})
|
engine = create_engine(environ.get("DATABASE_URL").strip(), connect_args={"options": "-c statement_timeout=5000 -c idle_in_transaction_session_timeout=59000"})
|
||||||
db_session = scoped_session(sessionmaker(bind=engine))
|
db_session = scoped_session(sessionmaker(bind=engine))
|
||||||
|
|
|
@ -62,7 +62,7 @@ def after_request(response):
|
||||||
if hasattr(g, 'v') and g.v:
|
if hasattr(g, 'v') and g.v:
|
||||||
user_id = g.v.id
|
user_id = g.v.id
|
||||||
|
|
||||||
if not session.get("GLOBAL") and request.method == "POST":
|
if SITE != 'watchpeopledie.tv' and not session.get("GLOBAL") and request.method == "POST":
|
||||||
timestamp = int(time.time())
|
timestamp = int(time.time())
|
||||||
if (g.v.last_active + LOGGEDIN_ACTIVE_TIME) < timestamp:
|
if (g.v.last_active + LOGGEDIN_ACTIVE_TIME) < timestamp:
|
||||||
g.v.last_active = timestamp
|
g.v.last_active = timestamp
|
||||||
|
|
|
@ -73,7 +73,8 @@ def publish(pid, v):
|
||||||
cache.delete_memoized(frontlist)
|
cache.delete_memoized(frontlist)
|
||||||
cache.delete_memoized(userpagelisting)
|
cache.delete_memoized(userpagelisting)
|
||||||
|
|
||||||
execute_snappy(p, v)
|
if SITE != 'watchpeopledie.tv':
|
||||||
|
execute_snappy(p, v)
|
||||||
|
|
||||||
return {"message": "Post has been published successfully!"}
|
return {"message": "Post has been published successfully!"}
|
||||||
|
|
||||||
|
@ -679,7 +680,7 @@ def submit_post(v, sub=None):
|
||||||
for key in redis_instance.scan_iter(key_pattern):
|
for key in redis_instance.scan_iter(key_pattern):
|
||||||
redis_instance.delete(key)
|
redis_instance.delete(key)
|
||||||
|
|
||||||
if not p.private:
|
if SITE != 'watchpeopledie.tv' and not p.private:
|
||||||
execute_snappy(p, v)
|
execute_snappy(p, v)
|
||||||
|
|
||||||
g.db.commit() #Necessary, do NOT remove
|
g.db.commit() #Necessary, do NOT remove
|
||||||
|
|
Loading…
Reference in New Issue