Add a flaresolverr cleaner
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7bee5b7b09
commit
320207e3b0
18
flaredestroyy.py
Normal file
18
flaredestroyy.py
Normal file
@ -0,0 +1,18 @@
|
||||
import json
|
||||
|
||||
import requests
|
||||
|
||||
from pynyaata.config import CLOUDPROXY_ENDPOINT
|
||||
|
||||
json_session = requests.post(CLOUDPROXY_ENDPOINT, data=json.dumps({
|
||||
'cmd': 'sessions.list'
|
||||
}))
|
||||
response = json.loads(json_session.text)
|
||||
sessions = response['sessions']
|
||||
|
||||
for session in sessions:
|
||||
requests.post(CLOUDPROXY_ENDPOINT, data=json.dumps({
|
||||
'cmd': 'sessions.destroy',
|
||||
'session': session
|
||||
}))
|
||||
print('Destroyed %s' % session)
|
@ -1,8 +1,6 @@
|
||||
from pynyaata.config import app
|
||||
from pynyaata.connectors.core import curl_content
|
||||
from pynyaata.models import AnimeLink
|
||||
|
||||
app.config['SQLALCHEMY_ECHO'] = False
|
||||
links = AnimeLink.query.all()
|
||||
|
||||
for link in links:
|
||||
|
@ -192,4 +192,5 @@ def admin_edit(link_id=None):
|
||||
|
||||
|
||||
def run():
|
||||
app.config['SQLALCHEMY_ECHO'] = IS_DEBUG
|
||||
app.run('0.0.0.0', APP_PORT, IS_DEBUG)
|
||||
|
@ -37,7 +37,6 @@ if db_host:
|
||||
db_user, db_password, db_host, db_name
|
||||
)
|
||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
|
||||
app.config['SQLALCHEMY_ECHO'] = IS_DEBUG
|
||||
app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {
|
||||
'pool_recycle': 200
|
||||
}
|
||||
|
Reference in New Issue
Block a user