fix reprocess

This commit is contained in:
2023-10-13 19:09:11 +02:00
parent e639f12f96
commit 1a493545af
2 changed files with 8 additions and 10 deletions

View File

@@ -34,10 +34,8 @@ services:
- 5432:5432
volumes:
- mabras_dbdata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD
- POSTGRES_USER
- POSTGRES_DB
env_file:
- .env
healthcheck:
test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
interval: 10s

View File

@@ -30,14 +30,14 @@ async def reprocess(ep_items: Evepraisal, ep_mat: Evepraisal, efficiency: float
item = db.get(models_sde.SDEType, rawitem.typeID)
buy_reprocess = sell_reprocess = 0.0
for mat in item.materials.all():
buy_reprocess += matprices[mat.type.id]['buy'] * mat.quantity * efficiency
sell_reprocess += matprices[mat.type.id]['sell'] * mat.quantity * efficiency
item_reprocess.append(PriceReprocess(typeID=item.typeID,
buy=item.prices.buy.max,
sell=item.prices.sell.min,
buy_reprocess += matprices[mat.material_type_id]['buy'] * mat.quantity * efficiency
sell_reprocess += matprices[mat.material_type_id]['sell'] * mat.quantity * efficiency
item_reprocess.append(PriceReprocess(typeID=rawitem.typeID,
buy=rawitem.prices.buy.max,
sell=rawitem.prices.sell.min,
buy_reprocess=buy_reprocess,
sell_reprocess=sell_reprocess,
name=item.name
name=rawitem.name
))
return item_reprocess