Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
exchain
nebula
Commits
841eaacf
Unverified
Commit
841eaacf
authored
Jan 05, 2024
by
refcell.eth
Committed by
GitHub
Jan 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Job Instantiation Encapsulation (#8751)
parent
454060fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
coordinator.go
op-challenger/game/scheduler/coordinator.go
+1
-1
types.go
op-challenger/game/scheduler/types.go
+9
-0
No files found.
op-challenger/game/scheduler/coordinator.go
View file @
841eaacf
...
@@ -143,7 +143,7 @@ func (c *coordinator) createJob(ctx context.Context, game types.GameMetadata, bl
...
@@ -143,7 +143,7 @@ func (c *coordinator) createJob(ctx context.Context, game types.GameMetadata, bl
c
.
logger
.
Debug
(
"Not rescheduling resolved game"
,
"game"
,
game
.
Proxy
,
"status"
,
state
.
status
)
c
.
logger
.
Debug
(
"Not rescheduling resolved game"
,
"game"
,
game
.
Proxy
,
"status"
,
state
.
status
)
return
nil
,
nil
return
nil
,
nil
}
}
return
&
job
{
block
:
blockNumber
,
addr
:
game
.
Proxy
,
player
:
state
.
player
,
status
:
state
.
status
}
,
nil
return
newJob
(
blockNumber
,
game
.
Proxy
,
state
.
player
,
state
.
status
)
,
nil
}
}
func
(
c
*
coordinator
)
enqueueJob
(
ctx
context
.
Context
,
j
job
)
error
{
func
(
c
*
coordinator
)
enqueueJob
(
ctx
context
.
Context
,
j
job
)
error
{
...
...
op-challenger/game/scheduler/types.go
View file @
841eaacf
...
@@ -25,3 +25,12 @@ type job struct {
...
@@ -25,3 +25,12 @@ type job struct {
player
GamePlayer
player
GamePlayer
status
types
.
GameStatus
status
types
.
GameStatus
}
}
func
newJob
(
block
uint64
,
addr
common
.
Address
,
player
GamePlayer
,
status
types
.
GameStatus
)
*
job
{
return
&
job
{
block
:
block
,
addr
:
addr
,
player
:
player
,
status
:
status
,
}
}
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