Merge branch 'master' of git://git.assembla.com/free_poker_tools
This commit is contained in:
@@ -26,19 +26,24 @@ MYSQL_INNODB=2
|
||||
PGSQL=3
|
||||
SQLITE=4
|
||||
|
||||
fastStoreHudCache=False # set this to True to test the new storeHudCache routine
|
||||
fastStoreHudCache=True # set this to True to test the new storeHudCache routine
|
||||
|
||||
saveActions=True # set this to False to avoid storing action data
|
||||
saveActions=False # set this to False to avoid storing action data
|
||||
# Pros: speeds up imports
|
||||
# Cons: no action data is saved, so you need to keep the hand histories
|
||||
# variance not available on stats page
|
||||
# no graphs
|
||||
|
||||
#stores a stud/razz hand into the database
|
||||
def ring_stud(backend, db, cursor, base, category, site_hand_no, gametype_id, hand_start_time
|
||||
def ring_stud(config, backend, db, cursor, base, category, site_hand_no, gametype_id, hand_start_time
|
||||
,names, player_ids, start_cashes, antes, card_values, card_suits, winnings, rakes
|
||||
,action_types, allIns, action_amounts, actionNos, hudImportData, maxSeats, tableName
|
||||
,seatNos):
|
||||
|
||||
import_options = config.get_import_parameters()
|
||||
saveActions = import_options['saveActions']
|
||||
fastStoreHudCache = import_options['fastStoreHudCache']
|
||||
|
||||
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
|
||||
|
||||
hands_id=fpdb_simple.storeHands(backend, db, cursor, site_hand_no, gametype_id
|
||||
@@ -57,11 +62,16 @@ def ring_stud(backend, db, cursor, base, category, site_hand_no, gametype_id, ha
|
||||
return hands_id
|
||||
#end def ring_stud
|
||||
|
||||
def ring_holdem_omaha(backend, db, cursor, base, category, site_hand_no, gametype_id
|
||||
def ring_holdem_omaha(config, backend, db, cursor, base, category, site_hand_no, gametype_id
|
||||
,hand_start_time, names, player_ids, start_cashes, positions, card_values
|
||||
,card_suits, board_values, board_suits, winnings, rakes, action_types, allIns
|
||||
,action_amounts, actionNos, hudImportData, maxSeats, tableName, seatNos):
|
||||
"""stores a holdem/omaha hand into the database"""
|
||||
|
||||
import_options = config.get_import_parameters()
|
||||
saveActions = import_options['saveActions']
|
||||
fastStoreHudCache = import_options['fastStoreHudCache']
|
||||
|
||||
t0 = time()
|
||||
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
|
||||
t1 = time()
|
||||
@@ -90,7 +100,7 @@ def ring_holdem_omaha(backend, db, cursor, base, category, site_hand_no, gametyp
|
||||
return hands_id
|
||||
#end def ring_holdem_omaha
|
||||
|
||||
def tourney_holdem_omaha(backend, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout
|
||||
def tourney_holdem_omaha(config, backend, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout
|
||||
,entries, prizepool, tourney_start, payin_amounts, ranks, tourneyTypeId
|
||||
,siteId #end of tourney specific params
|
||||
,site_hand_no, gametype_id, hand_start_time, names, player_ids
|
||||
@@ -98,6 +108,11 @@ def tourney_holdem_omaha(backend, db, cursor, base, category, siteTourneyNo, buy
|
||||
,board_suits, winnings, rakes, action_types, allIns, action_amounts
|
||||
,actionNos, hudImportData, maxSeats, tableName, seatNos):
|
||||
"""stores a tourney holdem/omaha hand into the database"""
|
||||
|
||||
import_options = config.get_import_parameters()
|
||||
saveActions = import_options['saveActions']
|
||||
fastStoreHudCache = import_options['fastStoreHudCache']
|
||||
|
||||
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
|
||||
fpdb_simple.fill_board_cards(board_values, board_suits)
|
||||
|
||||
@@ -124,12 +139,17 @@ def tourney_holdem_omaha(backend, db, cursor, base, category, siteTourneyNo, buy
|
||||
return hands_id
|
||||
#end def tourney_holdem_omaha
|
||||
|
||||
def tourney_stud(backend, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries
|
||||
def tourney_stud(config, backend, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries
|
||||
,prizepool, tourneyStartTime, payin_amounts, ranks, tourneyTypeId, siteId
|
||||
,siteHandNo, gametypeId, handStartTime, names, playerIds, startCashes, antes
|
||||
,cardValues, cardSuits, winnings, rakes, actionTypes, allIns, actionAmounts
|
||||
,actionNos, hudImportData, maxSeats, tableName, seatNos):
|
||||
#stores a tourney stud/razz hand into the database
|
||||
|
||||
import_options = config.get_import_parameters()
|
||||
saveActions = import_options['saveActions']
|
||||
fastStoreHudCache = import_options['fastStoreHudCache']
|
||||
|
||||
fpdb_simple.fillCardArrays(len(names), base, category, cardValues, cardSuits)
|
||||
|
||||
tourney_id=fpdb_simple.store_tourneys(cursor, tourneyTypeId, siteTourneyNo, entries, prizepool, tourneyStartTime)
|
||||
|
||||
Reference in New Issue
Block a user