Skip to content

Commit

Permalink
Remove peewee related stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
daangroot committed Mar 26, 2020
1 parent c0c7555 commit d3250a9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
7 changes: 0 additions & 7 deletions rocketmad/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
from datetime import datetime, timedelta
from flask_sqlalchemy import SQLAlchemy
from functools import reduce
from peewee import (Check, SQL, SmallIntegerField, IntegerField, CharField,
DoubleField, BooleanField, DateTimeField, fn, FloatField,
TextField, BigIntegerField, JOIN, OperationalError,
__exception_wrapper__, Model, DatabaseProxy)
from playhouse.flask_utils import FlaskDB
from playhouse.migrate import migrate, MySQLMigrator
from playhouse.pool import PooledMySQLDatabase
from sqlalchemy import func, Index, text
from sqlalchemy.dialects.mysql import BIGINT, DOUBLE, LONGTEXT, TINYINT
from sqlalchemy.orm import Load, load_only
Expand Down
13 changes: 0 additions & 13 deletions rocketmad/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,19 +1061,6 @@ def dynamic_rarity_refresher(app):
time.sleep(refresh_time_sec)


# Translate peewee model class attribute to database column name.
def peewee_attr_to_col(cls, field):
field_column = getattr(cls, field)

# Only try to do it on populated fields.
if field_column is not None:
field_column = field_column.db_column
else:
field_column = field

return field_column


def parse_geofence_file(geofence_file):
geofences = []
# Read coordinates from file.
Expand Down
7 changes: 0 additions & 7 deletions runhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ def filter(self, record):
else:
log.setLevel(logging.INFO)

# These are very noisy, let's shush them up a bit.
logging.getLogger('peewee').setLevel(logging.INFO)

# Turn these back up if debugging.
if args.verbose >= 3:
logging.getLogger('peewee').setLevel(logging.DEBUG)


if __name__ == '__main__':
set_log_and_verbosity(log)
Expand Down
2 changes: 0 additions & 2 deletions runserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ def filter(self, record):
log.setLevel(logging.INFO)

# These are very noisy, let's shush them up a bit.
logging.getLogger('peewee').setLevel(logging.INFO)
logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('werkzeug').setLevel(logging.ERROR)

Expand All @@ -173,7 +172,6 @@ def filter(self, record):
urllib3_logger.setLevel(logging.INFO)

if args.verbose >= 3:
logging.getLogger('peewee').setLevel(logging.DEBUG)
logging.getLogger('werkzeug').setLevel(logging.DEBUG)
logging.addLevelName(5, 'TRACE')

Expand Down

0 comments on commit d3250a9

Please sign in to comment.