Cleanup from merging flask-admin
This commit is contained in:
parent
8f56e7f882
commit
78f70563aa
5 changed files with 8 additions and 70 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -7,4 +7,6 @@ Caddyfile
|
||||||
|
|
||||||
*.dump.sql
|
*.dump.sql
|
||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from generate import generate_order, generate_punishment
|
||||||
from db.queries import order_status_by_id, order_status_put, order_status_confirm
|
from db.queries import order_status_by_id, order_status_put, order_status_confirm
|
||||||
from mastodon import Mastodon
|
from mastodon import Mastodon
|
||||||
from telegram.telegram import Telegram
|
from telegram.telegram import Telegram
|
||||||
from settings import ORDER_TIMEOUT, ENV, MASTODON_INSTANCE
|
from settings import ENV
|
||||||
from util import timezone
|
from util import timezone
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
@ -75,7 +75,8 @@ async def order_issue(orders_pool):
|
||||||
orders_str = "\n".join(orders_info['orders'])
|
orders_str = "\n".join(orders_info['orders'])
|
||||||
|
|
||||||
created_at = datetime.datetime.now(tz=timezone())
|
created_at = datetime.datetime.now(tz=timezone())
|
||||||
due_at = created_at + ORDER_TIMEOUT
|
if orders_pool.confirm_delay is not None:
|
||||||
|
due_at = created_at + datetime.timedelta(hours=orders_pool.confirm_delay)
|
||||||
|
|
||||||
repeats_count = orders_info.get('count', 0)
|
repeats_count = orders_info.get('count', 0)
|
||||||
|
|
||||||
|
|
|
||||||
61
orders.yml
61
orders.yml
|
|
@ -1,61 +0,0 @@
|
||||||
orders_probability: 0.7
|
|
||||||
orders:
|
|
||||||
- text: "MX Pants + MX Boots"
|
|
||||||
weight: 20
|
|
||||||
repeat: 0.7
|
|
||||||
add:
|
|
||||||
- text: "+ Leather Collar"
|
|
||||||
probability: 0.5
|
|
||||||
- text: "Race Pants + MX Boots"
|
|
||||||
weight: 20
|
|
||||||
repeat: 0.7
|
|
||||||
add:
|
|
||||||
- text: "+ Leather Collar"
|
|
||||||
probability: 0.5
|
|
||||||
- text: "Marine Uniform"
|
|
||||||
weight: 50
|
|
||||||
repeat: 0.7
|
|
||||||
add:
|
|
||||||
- text: "+ Leg shackles"
|
|
||||||
probability: 0.9
|
|
||||||
- text: "+ Leather Collar"
|
|
||||||
probability: 0.5
|
|
||||||
- text: "Army Uniform"
|
|
||||||
weight: 30
|
|
||||||
repeat: 0.7
|
|
||||||
add:
|
|
||||||
- text: "+ Leg Shackles"
|
|
||||||
probability: 0.9
|
|
||||||
- text: "+ Leather Collar"
|
|
||||||
probability: 0.5
|
|
||||||
- text: "HiViz Overalls + Haix Boots"
|
|
||||||
weight: 20
|
|
||||||
repeat: 0.7
|
|
||||||
add:
|
|
||||||
- text: "+ Leather Collar"
|
|
||||||
probability: 0.5
|
|
||||||
- text: "e.s. Pants + Work Boots"
|
|
||||||
weight: 20
|
|
||||||
repeat: 0.7
|
|
||||||
add:
|
|
||||||
- text: "+ Leather Collar"
|
|
||||||
probability: 0.5
|
|
||||||
punishments:
|
|
||||||
- text: "Kneel facing a wall for 30 minutes"
|
|
||||||
weight: 20
|
|
||||||
- text: "Kneel facing a wall for 60 minutes"
|
|
||||||
weight: 5
|
|
||||||
- text: "4 hours of ball stretcher time"
|
|
||||||
weight: 40
|
|
||||||
- text: "6 hours of ball stretcher time"
|
|
||||||
weight: 5
|
|
||||||
- text: "2 hours of small butt plug time"
|
|
||||||
weight: 20
|
|
||||||
- text: "1 hour of large butt plug time"
|
|
||||||
weight: 20
|
|
||||||
- text: "2 hours of large butt plug time"
|
|
||||||
weight: 5
|
|
||||||
- text: "2 hours of electro ball torture"
|
|
||||||
weight: 20
|
|
||||||
- text: "4 hours of electro ball torture"
|
|
||||||
weight: 5
|
|
||||||
|
|
@ -3,14 +3,10 @@ import datetime
|
||||||
|
|
||||||
ENV = os.environ.get('ENV', 'dev')
|
ENV = os.environ.get('ENV', 'dev')
|
||||||
|
|
||||||
ORDER_TIME = os.environ.get('ORDER_TIME', '9:00')
|
|
||||||
ORDER_TIMEOUT = datetime.timedelta(
|
|
||||||
hours=os.environ.get('ORDER_TIMEOUT', 3)
|
|
||||||
)
|
|
||||||
|
|
||||||
MASTODON_INSTANCE = os.environ.get("MASTODON_INSTANCE")
|
MASTODON_INSTANCE = os.environ.get("MASTODON_INSTANCE")
|
||||||
MASTODON_ACCESS_TOKEN = os.environ.get('MASTODON_ACCESS_TOKEN')
|
MASTODON_ACCESS_TOKEN = os.environ.get('MASTODON_ACCESS_TOKEN')
|
||||||
MASTODON_VISIBILITY = os.environ.get('MASTODON_VISIBILITY', 'direct')
|
MASTODON_VISIBILITY = os.environ.get('MASTODON_VISIBILITY', 'direct')
|
||||||
|
MASTODON_CC_LIST = os.environ.get('MASTODON_CC_LIST', '')
|
||||||
|
|
||||||
MASTODON_OAUTH_SCOPES = os.environ.get('MASTODON_OAUTH_SCOPES', 'profile')
|
MASTODON_OAUTH_SCOPES = os.environ.get('MASTODON_OAUTH_SCOPES', 'profile')
|
||||||
MASTODON_OAUTH_REDIRECT_URI = os.environ.get('MASTODON_OAUTH_REDIRECT_URI')
|
MASTODON_OAUTH_REDIRECT_URI = os.environ.get('MASTODON_OAUTH_REDIRECT_URI')
|
||||||
|
|
|
||||||
2
util.py
2
util.py
|
|
@ -2,7 +2,7 @@ import aiohttp
|
||||||
import pytz
|
import pytz
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from settings import TIMEZONE, ORDER_TIME
|
from settings import TIMEZONE
|
||||||
|
|
||||||
def make_session():
|
def make_session():
|
||||||
return aiohttp.ClientSession()
|
return aiohttp.ClientSession()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue