fix reprocess
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user