Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
mhewedy committed May 23, 2024
1 parent dcc3c6b commit 9b1686d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

bot = BotApp()
userSelector = UserSelector()
order_manager = FileSystemOrderManager(file_path=os.getenv('VOLUME_ROOT_FS', '/tmp') + '/orders.json')
order_manager = FileSystemOrderManager()


@bot.command(text=True)
Expand Down
3 changes: 2 additions & 1 deletion order_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ast
import json
import logging
import os
from abc import ABC
from pathlib import Path

Expand Down Expand Up @@ -30,7 +31,7 @@ class InMemoryOrderManager(OrderManager):


class FileSystemOrderManager(OrderManager):
def __init__(self, file_path):
def __init__(self, file_path=os.getenv('VOLUME_ROOT_FS', '/tmp') + '/orders.json'):
super().__init__()
self.file_path = Path(file_path)
logging.info('loading orders from: {}'.format(self.file_path))
Expand Down

0 comments on commit 9b1686d

Please sign in to comment.