set up unfonctionnal rework, TODO -> pricing separation
This commit is contained in:
@@ -98,14 +98,14 @@ func (d *WorkflowExecutions) GetName() string {
|
||||
}
|
||||
|
||||
func (d *WorkflowExecutions) GetAccessor(request *tools.APIRequest) utils.Accessor {
|
||||
return NewShallowAccessor(request) // Create a new instance of the accessor
|
||||
return NewAccessor(request) // Create a new instance of the accessor
|
||||
}
|
||||
|
||||
func (d *WorkflowExecutions) VerifyAuth(request *tools.APIRequest) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (d *WorkflowExecutions) ToBookings(wf *workflow.Workflow) []*booking.Booking {
|
||||
func (d *WorkflowExecutions) Book(wf *workflow.Workflow) []*booking.Booking {
|
||||
booking := []*booking.Booking{}
|
||||
for _, p := range wf.ProcessingResources {
|
||||
booking = append(booking, d.toItemBooking(wf.GetByRelatedProcessing(p.GetID(), wf.IsStorage))...)
|
||||
|
@@ -16,11 +16,6 @@ import (
|
||||
"github.com/robfig/cron"
|
||||
)
|
||||
|
||||
type Schedule struct {
|
||||
Start time.Time
|
||||
End *time.Time
|
||||
}
|
||||
|
||||
/*
|
||||
* WorkflowSchedule is a struct that contains the scheduling information of a workflow
|
||||
* It contains the mode of the schedule (Task or Service), the name of the schedule, the start and end time of the schedule and the cron expression
|
||||
@@ -78,7 +73,7 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, caller *tools.HTTPCaller)
|
||||
return false, wf, []*WorkflowExecutions{}, err
|
||||
}
|
||||
for _, exec := range execs {
|
||||
bookings := exec.ToBookings(wf)
|
||||
bookings := exec.Book(wf)
|
||||
for _, booking := range bookings {
|
||||
_, err := (&peer.Peer{}).LaunchPeerExecution(booking.DestPeerID, "",
|
||||
tools.BOOKING, tools.POSTCHECK, booking.Serialize(booking), caller)
|
||||
@@ -243,6 +238,11 @@ func (ws *WorkflowSchedule) getDates() ([]Schedule, error) {
|
||||
return schedule, nil
|
||||
}
|
||||
|
||||
type Schedule struct {
|
||||
Start time.Time
|
||||
End *time.Time
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO : LARGEST GRAIN PLANIFYING THE WORKFLOW WHEN OPTION IS SET
|
||||
* SET PROTECTION BORDER TIME
|
||||
|
Reference in New Issue
Block a user