Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterc
Commits
7eef9732
Commit
7eef9732
authored
Nov 25, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
match creation in bet mode
parent
36ae42f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
match_timer.py
mbetterclient/core/match_timer.py
+35
-0
No files found.
mbetterclient/core/match_timer.py
View file @
7eef9732
...
...
@@ -672,6 +672,14 @@ class MatchTimerComponent(ThreadedComponent):
try
:
from
..database.models
import
MatchModel
# Get betting mode configuration
betting_mode
=
self
.
_get_betting_mode_config
()
# If betting mode is "all_bets_on_start", new matches should be 'bet'
if
betting_mode
==
"all_bets_on_start"
:
logger
.
info
(
f
"Betting mode is 'all_bets_on_start' - new matches will be in bet status"
)
return
'bet'
# Check if system is ingame (has any match with status 'ingame')
ingame_match
=
session
.
query
(
MatchModel
)
.
filter
(
MatchModel
.
status
==
'ingame'
,
...
...
@@ -698,6 +706,33 @@ class MatchTimerComponent(ThreadedComponent):
logger
.
error
(
f
"Failed to determine new match status: {e}"
)
return
'scheduled'
# Default fallback
def
_get_betting_mode_config
(
self
)
->
str
:
"""Get global betting mode configuration from game config (default: 'all_bets_on_start')"""
try
:
session
=
self
.
db_manager
.
get_session
()
try
:
from
..database.models
import
GameConfigModel
# Get global betting mode configuration from game_config table
betting_mode_config
=
session
.
query
(
GameConfigModel
)
.
filter_by
(
config_key
=
'betting_mode'
)
.
first
()
if
betting_mode_config
:
return
betting_mode_config
.
get_typed_value
()
else
:
# Default to 'all_bets_on_start' if no configuration found
logger
.
debug
(
"No betting mode configuration found, using default: 'all_bets_on_start'"
)
return
'all_bets_on_start'
finally
:
session
.
close
()
except
Exception
as
e
:
logger
.
error
(
f
"Failed to get betting mode config: {e}"
)
# Default fallback
return
'all_bets_on_start'
def
_send_timer_update
(
self
):
"""Send timer update message to all clients"""
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment