delete scheduler
This commit is contained in:
@@ -244,52 +244,17 @@ func NewRequest(collection LibDataEnum, user string, peerID string, groups []str
|
||||
return &Request{collection: collection, user: user, peerID: peerID, groups: groups, caller: caller}
|
||||
}
|
||||
|
||||
func ToScheduler(m interface{}) (n *workflow_execution.WorkflowSchedule) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
return
|
||||
}
|
||||
}()
|
||||
return m.(*workflow_execution.WorkflowSchedule)
|
||||
}
|
||||
|
||||
func (r *Request) Schedule(wfID string, scheduler *workflow_execution.WorkflowSchedule) (*workflow_execution.WorkflowSchedule, error) {
|
||||
ws, _, _, err := scheduler.Schedules(wfID, &tools.APIRequest{
|
||||
Caller: r.caller,
|
||||
Username: r.user,
|
||||
PeerID: r.peerID,
|
||||
Groups: r.groups,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ws, nil
|
||||
}
|
||||
|
||||
func (r *Request) CheckBooking(wfID string, mode int, start string, end string, durationInS float64, cron string) bool {
|
||||
ok, _, _, _, _, err := workflow_execution.NewScheduler(mode, start, end, durationInS, cron).GetBuyAndBook(wfID, &tools.APIRequest{
|
||||
Caller: r.caller,
|
||||
Username: r.user,
|
||||
PeerID: r.peerID,
|
||||
Groups: r.groups,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return false
|
||||
}
|
||||
return ok
|
||||
}
|
||||
|
||||
/*
|
||||
func (r *Request) PaymentTunnel(o *order.Order, scheduler *workflow_execution.WorkflowSchedule) error {
|
||||
/*return o.Pay(scheduler, &tools.APIRequest{
|
||||
return o.Pay(scheduler, &tools.APIRequest{
|
||||
Caller: r.caller,
|
||||
Username: r.user,
|
||||
PeerID: r.peerID,
|
||||
Groups: r.groups,
|
||||
})*/
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
* Search will search for the data in the database
|
||||
* @param filters *dbs.Filters
|
||||
|
||||
Reference in New Issue
Block a user