@@ -39,9 +39,9 @@ type signalChannel struct {
39
39
40
40
type WfState struct {
41
41
instance * core.WorkflowInstance
42
- scheduleEventID int
42
+ scheduleEventID int64
43
43
commands []* command.Command
44
- pendingFutures map [int ]DecodingSettable
44
+ pendingFutures map [int64 ]DecodingSettable
45
45
replaying bool
46
46
47
47
pendingSignals map [string ][]payload.Payload
@@ -58,7 +58,7 @@ func NewWorkflowState(instance *core.WorkflowInstance, logger log.Logger, clock
58
58
instance : instance ,
59
59
commands : []* command.Command {},
60
60
scheduleEventID : 1 ,
61
- pendingFutures : map [int ]DecodingSettable {},
61
+ pendingFutures : map [int64 ]DecodingSettable {},
62
62
63
63
pendingSignals : map [string ][]payload.Payload {},
64
64
signalChannels : make (map [string ]* signalChannel ),
@@ -81,22 +81,22 @@ func WithWorkflowState(ctx sync.Context, wfState *WfState) sync.Context {
81
81
return sync .WithValue (ctx , workflowCtxKey , wfState )
82
82
}
83
83
84
- func (wf * WfState ) GetNextScheduleEventID () int {
84
+ func (wf * WfState ) GetNextScheduleEventID () int64 {
85
85
scheduleEventID := wf .scheduleEventID
86
86
wf .scheduleEventID ++
87
87
return scheduleEventID
88
88
}
89
89
90
- func (wf * WfState ) TrackFuture (scheduleEventID int , f DecodingSettable ) {
90
+ func (wf * WfState ) TrackFuture (scheduleEventID int64 , f DecodingSettable ) {
91
91
wf .pendingFutures [scheduleEventID ] = f
92
92
}
93
93
94
- func (wf * WfState ) FutureByScheduleEventID (scheduleEventID int ) (DecodingSettable , bool ) {
94
+ func (wf * WfState ) FutureByScheduleEventID (scheduleEventID int64 ) (DecodingSettable , bool ) {
95
95
f , ok := wf .pendingFutures [scheduleEventID ]
96
96
return f , ok
97
97
}
98
98
99
- func (wf * WfState ) RemoveFuture (scheduleEventID int ) {
99
+ func (wf * WfState ) RemoveFuture (scheduleEventID int64 ) {
100
100
delete (wf .pendingFutures , scheduleEventID )
101
101
}
102
102
@@ -108,7 +108,7 @@ func (wf *WfState) AddCommand(cmd *command.Command) {
108
108
wf .commands = append (wf .commands , cmd )
109
109
}
110
110
111
- func (wf * WfState ) RemoveCommandByEventID (eventID int ) * command.Command {
111
+ func (wf * WfState ) RemoveCommandByEventID (eventID int64 ) * command.Command {
112
112
for i , c := range wf .commands {
113
113
if c .ID == eventID {
114
114
wf .commands = append (wf .commands [:i ], wf .commands [i + 1 :]... )
0 commit comments