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
23a67046
Commit
23a67046
authored
Nov 25, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uhmm
parent
216d3044
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
games_thread.py
mbetterclient/core/games_thread.py
+19
-0
No files found.
mbetterclient/core/games_thread.py
View file @
23a67046
...
@@ -490,6 +490,8 @@ class GamesThread(ThreadedComponent):
...
@@ -490,6 +490,8 @@ class GamesThread(ThreadedComponent):
self
.
_handle_match_start
(
message
)
self
.
_handle_match_start
(
message
)
elif
message
.
type
==
MessageType
.
GAME_STATUS
:
elif
message
.
type
==
MessageType
.
GAME_STATUS
:
self
.
_handle_game_status_request
(
message
)
self
.
_handle_game_status_request
(
message
)
elif
message
.
type
==
MessageType
.
START_INTRO
:
self
.
_handle_start_intro
(
message
)
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
error
(
f
"Failed to process message: {e}"
)
logger
.
error
(
f
"Failed to process message: {e}"
)
...
@@ -506,6 +508,23 @@ class GamesThread(ThreadedComponent):
...
@@ -506,6 +508,23 @@ class GamesThread(ThreadedComponent):
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
error
(
f
"Failed to handle game update: {e}"
)
logger
.
error
(
f
"Failed to handle game update: {e}"
)
def
_handle_start_intro
(
self
,
message
:
Message
):
"""Handle START_INTRO message - broadcast GAME_STARTED"""
try
:
fixture_id
=
message
.
data
.
get
(
"fixture_id"
)
logger
.
info
(
f
"Received START_INTRO message for fixture {fixture_id} - broadcasting GAME_STARTED"
)
# Broadcast GAME_STARTED message to notify all components that game has started with this fixture
game_started_message
=
MessageBuilder
.
game_started
(
sender
=
self
.
name
,
fixture_id
=
fixture_id
)
self
.
message_bus
.
publish
(
game_started_message
,
broadcast
=
True
)
logger
.
info
(
f
"🎯 Broadcast GAME_STARTED message for fixture {fixture_id}"
)
except
Exception
as
e
:
logger
.
error
(
f
"Failed to handle START_INTRO message: {e}"
)
def
_find_last_fixture_with_pending_matches
(
self
)
->
Optional
[
str
]:
def
_find_last_fixture_with_pending_matches
(
self
)
->
Optional
[
str
]:
"""Find the last fixture that has pending matches"""
"""Find the last fixture that has pending matches"""
try
:
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