pass all settings through so that a new one can be used to skip updating hudcache (not used yet)
This commit is contained in:
parent
680e5c2f89
commit
b935a5ad67
|
@ -394,7 +394,7 @@ class Importer:
|
||||||
self.hand=hand
|
self.hand=hand
|
||||||
|
|
||||||
try:
|
try:
|
||||||
handsId = fpdb_parse_logic.mainParser(self.settings['db-backend'], self.fdb.db
|
handsId = fpdb_parse_logic.mainParser(self.settings, self.fdb.db
|
||||||
,self.fdb.cursor, self.siteIds[site], category, hand, self.config)
|
,self.fdb.cursor, self.siteIds[site], category, hand, self.config)
|
||||||
self.fdb.db.commit()
|
self.fdb.db.commit()
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,12 @@ SQLITE = 4
|
||||||
# # no graphs
|
# # no graphs
|
||||||
|
|
||||||
#stores a stud/razz hand into the database
|
#stores a stud/razz hand into the database
|
||||||
def ring_stud(config, backend, db, cursor, base, category, site_hand_no, gametype_id, hand_start_time
|
def ring_stud(config, settings, db, cursor, base, category, site_hand_no, gametype_id, hand_start_time
|
||||||
,names, player_ids, start_cashes, antes, card_values, card_suits, winnings, rakes
|
,names, player_ids, start_cashes, antes, card_values, card_suits, winnings, rakes
|
||||||
,action_types, allIns, action_amounts, actionNos, hudImportData, maxSeats, tableName
|
,action_types, allIns, action_amounts, actionNos, hudImportData, maxSeats, tableName
|
||||||
,seatNos):
|
,seatNos):
|
||||||
|
|
||||||
|
backend = settings['db-backend']
|
||||||
import_options = config.get_import_parameters()
|
import_options = config.get_import_parameters()
|
||||||
|
|
||||||
saveActions = False if import_options['saveActions'] == False else True
|
saveActions = False if import_options['saveActions'] == False else True
|
||||||
|
@ -55,6 +56,7 @@ def ring_stud(config, backend, db, cursor, base, category, site_hand_no, gametyp
|
||||||
,start_cashes, antes, card_values
|
,start_cashes, antes, card_values
|
||||||
,card_suits, winnings, rakes, seatNos)
|
,card_suits, winnings, rakes, seatNos)
|
||||||
|
|
||||||
|
if 'updateHudCache' not in settings or settings['updateHudCache'] != 'drop':
|
||||||
fpdb_simple.storeHudCache(backend, cursor, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
|
fpdb_simple.storeHudCache(backend, cursor, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
|
||||||
|
|
||||||
if saveActions:
|
if saveActions:
|
||||||
|
@ -63,12 +65,13 @@ def ring_stud(config, backend, db, cursor, base, category, site_hand_no, gametyp
|
||||||
return hands_id
|
return hands_id
|
||||||
#end def ring_stud
|
#end def ring_stud
|
||||||
|
|
||||||
def ring_holdem_omaha(config, backend, db, cursor, base, category, site_hand_no, gametype_id
|
def ring_holdem_omaha(config, settings, db, cursor, base, category, site_hand_no, gametype_id
|
||||||
,hand_start_time, names, player_ids, start_cashes, positions, card_values
|
,hand_start_time, names, player_ids, start_cashes, positions, card_values
|
||||||
,card_suits, board_values, board_suits, winnings, rakes, action_types, allIns
|
,card_suits, board_values, board_suits, winnings, rakes, action_types, allIns
|
||||||
,action_amounts, actionNos, hudImportData, maxSeats, tableName, seatNos):
|
,action_amounts, actionNos, hudImportData, maxSeats, tableName, seatNos):
|
||||||
"""stores a holdem/omaha hand into the database"""
|
"""stores a holdem/omaha hand into the database"""
|
||||||
|
|
||||||
|
backend = settings['db-backend']
|
||||||
import_options = config.get_import_parameters()
|
import_options = config.get_import_parameters()
|
||||||
saveActions = False if import_options['saveActions'] == False else True
|
saveActions = False if import_options['saveActions'] == False else True
|
||||||
fastStoreHudCache = True if import_options['fastStoreHudCache'] == True else False
|
fastStoreHudCache = True if import_options['fastStoreHudCache'] == True else False
|
||||||
|
@ -90,6 +93,7 @@ def ring_holdem_omaha(config, backend, db, cursor, base, category, site_hand_no,
|
||||||
, positions, card_values, card_suits, winnings, rakes, seatNos, hudImportData)
|
, positions, card_values, card_suits, winnings, rakes, seatNos, hudImportData)
|
||||||
t4 = time()
|
t4 = time()
|
||||||
#print "ring holdem, backend=%d" % backend
|
#print "ring holdem, backend=%d" % backend
|
||||||
|
if 'updateHudCache' not in settings or settings['updateHudCache'] != 'drop':
|
||||||
if fastStoreHudCache:
|
if fastStoreHudCache:
|
||||||
fpdb_simple.storeHudCache2(backend, cursor, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
|
fpdb_simple.storeHudCache2(backend, cursor, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
|
||||||
else:
|
else:
|
||||||
|
@ -104,7 +108,7 @@ def ring_holdem_omaha(config, backend, db, cursor, base, category, site_hand_no,
|
||||||
return hands_id
|
return hands_id
|
||||||
#end def ring_holdem_omaha
|
#end def ring_holdem_omaha
|
||||||
|
|
||||||
def tourney_holdem_omaha(config, backend, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout
|
def tourney_holdem_omaha(config, settings, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout
|
||||||
,entries, prizepool, tourney_start, payin_amounts, ranks, tourneyTypeId
|
,entries, prizepool, tourney_start, payin_amounts, ranks, tourneyTypeId
|
||||||
,siteId #end of tourney specific params
|
,siteId #end of tourney specific params
|
||||||
,site_hand_no, gametype_id, hand_start_time, names, player_ids
|
,site_hand_no, gametype_id, hand_start_time, names, player_ids
|
||||||
|
@ -113,6 +117,7 @@ def tourney_holdem_omaha(config, backend, db, cursor, base, category, siteTourne
|
||||||
,actionNos, hudImportData, maxSeats, tableName, seatNos):
|
,actionNos, hudImportData, maxSeats, tableName, seatNos):
|
||||||
"""stores a tourney holdem/omaha hand into the database"""
|
"""stores a tourney holdem/omaha hand into the database"""
|
||||||
|
|
||||||
|
backend = settings['db-backend']
|
||||||
import_options = config.get_import_parameters()
|
import_options = config.get_import_parameters()
|
||||||
saveActions = True if import_options['saveActions'] == True else False
|
saveActions = True if import_options['saveActions'] == True else False
|
||||||
fastStoreHudCache = True if import_options['fastStoreHudCache'] == True else False
|
fastStoreHudCache = True if import_options['fastStoreHudCache'] == True else False
|
||||||
|
@ -131,6 +136,7 @@ def tourney_holdem_omaha(config, backend, db, cursor, base, category, siteTourne
|
||||||
, card_values, card_suits, winnings, rakes, seatNos, tourneys_players_ids)
|
, card_values, card_suits, winnings, rakes, seatNos, tourneys_players_ids)
|
||||||
|
|
||||||
#print "tourney holdem, backend=%d" % backend
|
#print "tourney holdem, backend=%d" % backend
|
||||||
|
if 'updateHudCache' not in settings or settings['updateHudCache'] != 'drop':
|
||||||
if fastStoreHudCache:
|
if fastStoreHudCache:
|
||||||
fpdb_simple.storeHudCache2(backend, cursor, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
|
fpdb_simple.storeHudCache2(backend, cursor, base, category, gametype_id, hand_start_time, player_ids, hudImportData)
|
||||||
else:
|
else:
|
||||||
|
@ -143,13 +149,14 @@ def tourney_holdem_omaha(config, backend, db, cursor, base, category, siteTourne
|
||||||
return hands_id
|
return hands_id
|
||||||
#end def tourney_holdem_omaha
|
#end def tourney_holdem_omaha
|
||||||
|
|
||||||
def tourney_stud(config, backend, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries
|
def tourney_stud(config, settings, db, cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries
|
||||||
,prizepool, tourneyStartTime, payin_amounts, ranks, tourneyTypeId, siteId
|
,prizepool, tourneyStartTime, payin_amounts, ranks, tourneyTypeId, siteId
|
||||||
,siteHandNo, gametypeId, handStartTime, names, playerIds, startCashes, antes
|
,siteHandNo, gametypeId, handStartTime, names, playerIds, startCashes, antes
|
||||||
,cardValues, cardSuits, winnings, rakes, actionTypes, allIns, actionAmounts
|
,cardValues, cardSuits, winnings, rakes, actionTypes, allIns, actionAmounts
|
||||||
,actionNos, hudImportData, maxSeats, tableName, seatNos):
|
,actionNos, hudImportData, maxSeats, tableName, seatNos):
|
||||||
#stores a tourney stud/razz hand into the database
|
#stores a tourney stud/razz hand into the database
|
||||||
|
|
||||||
|
backend = settings['db-backend']
|
||||||
import_options = config.get_import_parameters()
|
import_options = config.get_import_parameters()
|
||||||
saveActions = True if import_options['saveActions'] == True else False
|
saveActions = True if import_options['saveActions'] == True else False
|
||||||
fastStoreHudCache = True if import_options['fastStoreHudCache'] == True else False
|
fastStoreHudCache = True if import_options['fastStoreHudCache'] == True else False
|
||||||
|
@ -166,6 +173,7 @@ def tourney_stud(config, backend, db, cursor, base, category, siteTourneyNo, buy
|
||||||
, playerIds, startCashes, antes, cardValues, cardSuits
|
, playerIds, startCashes, antes, cardValues, cardSuits
|
||||||
, winnings, rakes, seatNos, tourneys_players_ids)
|
, winnings, rakes, seatNos, tourneys_players_ids)
|
||||||
|
|
||||||
|
if 'updateHudCache' not in settings or settings['updateHudCache'] != 'drop':
|
||||||
fpdb_simple.storeHudCache(backend, cursor, base, category, gametypeId, hand_start_time, playerIds, hudImportData)
|
fpdb_simple.storeHudCache(backend, cursor, base, category, gametypeId, hand_start_time, playerIds, hudImportData)
|
||||||
|
|
||||||
if saveActions:
|
if saveActions:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user