fix reprocess
This commit is contained in:
@@ -34,10 +34,8 @@ services:
|
|||||||
- 5432:5432
|
- 5432:5432
|
||||||
volumes:
|
volumes:
|
||||||
- mabras_dbdata:/var/lib/postgresql/data
|
- mabras_dbdata:/var/lib/postgresql/data
|
||||||
environment:
|
env_file:
|
||||||
- POSTGRES_PASSWORD
|
- .env
|
||||||
- POSTGRES_USER
|
|
||||||
- POSTGRES_DB
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
|
test: pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
|
||||||
interval: 10s
|
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)
|
item = db.get(models_sde.SDEType, rawitem.typeID)
|
||||||
buy_reprocess = sell_reprocess = 0.0
|
buy_reprocess = sell_reprocess = 0.0
|
||||||
for mat in item.materials.all():
|
for mat in item.materials.all():
|
||||||
buy_reprocess += matprices[mat.type.id]['buy'] * mat.quantity * efficiency
|
buy_reprocess += matprices[mat.material_type_id]['buy'] * mat.quantity * efficiency
|
||||||
sell_reprocess += matprices[mat.type.id]['sell'] * mat.quantity * efficiency
|
sell_reprocess += matprices[mat.material_type_id]['sell'] * mat.quantity * efficiency
|
||||||
item_reprocess.append(PriceReprocess(typeID=item.typeID,
|
item_reprocess.append(PriceReprocess(typeID=rawitem.typeID,
|
||||||
buy=item.prices.buy.max,
|
buy=rawitem.prices.buy.max,
|
||||||
sell=item.prices.sell.min,
|
sell=rawitem.prices.sell.min,
|
||||||
buy_reprocess=buy_reprocess,
|
buy_reprocess=buy_reprocess,
|
||||||
sell_reprocess=sell_reprocess,
|
sell_reprocess=sell_reprocess,
|
||||||
name=item.name
|
name=rawitem.name
|
||||||
))
|
))
|
||||||
return item_reprocess
|
return item_reprocess
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user