Commit 1af4d60a37a3f079b4cc7328d451069af6ce03c4
- Diff rendering mode:
- inline
- side by side
web/datainput.py
(5 / 0)
|   | |||
| 34 | 34 | ||
| 35 | 35 | (buy,sell) = stats.item_stat(db, typeid, regionlimit = [regionid], nocache = True, minQ = minq) | |
| 36 | 36 | all_stat = stats.item_stat(db, typeid, regionlimit = [regionid], nocache = True, minQ = minq, buysell = False) | |
| 37 | cur = db.cursor() | ||
| 38 | # Buyup not yet available in stats | ||
| 39 | cur.execute("INSERT INTO trends_type_region (typeid, region, average, median, volume, stddev, buyup, NOW()) VALUES (%s, %s, %s, %s, %s, %s, %s)", | ||
| 40 | [typeid, regionid, all_stat['avg_price'], all_stat['median'], all_stat['total_vol'], all_stat['stddev'], 0]) | ||
| 41 | cur.commit() | ||
| 37 | 42 | ||
| 38 | 43 | self.queue.task_done() | |
| 39 | 44 |

