Skip to content

Commit

Permalink
Fix some minor linting problems and small bugs in startup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
officialcryptomaster committed Feb 22, 2019
1 parent 8ae299a commit a2fb2f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion run-pydex
@@ -1,5 +1,5 @@
source setup
source start-order-update-hanlder
source start-order-update-handler

if [[ `lsof -t -i :3000` ]]; then
echo "dex server already running at port 3000"
Expand Down
4 changes: 2 additions & 2 deletions src/pydex_app/order_update_handler.py
Expand Up @@ -149,7 +149,7 @@ def on_update(self, res):
self.handle_fillable_order(order_hash)
return res

def get_order_by_hash(self, order_hash):
def get_order_by_hash(self, order_hash): # pylint: disable=no-self-use
"""Get an order by hash from the database.
Keyword argument:
Expand Down Expand Up @@ -216,7 +216,7 @@ def handle_unfillable_order(
if commit:
self._commit_db()

def _commit_db(self):
def _commit_db(self): # pylint: disable=no-self-use
LOGGER.debug("commit changes to DB...")
db.session.commit() # pylint: disable=no-member

Expand Down
2 changes: 1 addition & 1 deletion src/utils/miscutils.py
Expand Up @@ -38,7 +38,7 @@ def try_(func, *args, **kwargs):
try:
return func(*args, **kwargs)
except Exception: # pylint: disable=broad-except
return None
return _default_val


def paginate(arr, page=1, per_page=20):
Expand Down
3 changes: 2 additions & 1 deletion start-order-update-handler
@@ -1,8 +1,9 @@
source start-order-watcher-server
sleep 1
source pydex_env/bin/activate

export ORDER_UPDATE_HANDLER_LOG_FILE="./logs/order_update_handler.log"
alias get-order-update-handler-pid="ps -aef | grep -v grep | grep 'python3 src/pydex_app/order_update_handler.py' | tr -s ' ' | cut -d ' ' -f 4"
alias get-order-update-handler-pid="ps -aef | grep -v grep | grep 'python3 src/pydex_app/order_update_handler.py' | tr -s ' ' | cut -d ' ' -f 3"
export ORDER_UPDATE_HANDLER_PID=`get-order-update-handler-pid`

if [[ $ORDER_UPDATE_HANDLER_PID ]]; then
Expand Down

0 comments on commit a2fb2f2

Please sign in to comment.