Compare commits
2 Commits
a86e78841b
...
deb819c5af
| Author | SHA1 | Date | |
|---|---|---|---|
| deb819c5af | |||
| 55a039bd66 |
@@ -82,7 +82,8 @@ func (abs *PricedResource) GetLocationEnd() *time.Time {
|
||||
|
||||
func (abs *PricedResource) GetLocationStart() *time.Time {
|
||||
if abs.BookingConfiguration == nil {
|
||||
return nil
|
||||
now := time.Now().Add(2 * time.Minute)
|
||||
return &now
|
||||
}
|
||||
return abs.BookingConfiguration.UsageStart
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ func (d *WorkflowExecution) buyEach(bs pricing.BillingStrategy, executionsID str
|
||||
d.PeerBuyByGraph[priced.GetCreatorID()][itemID] = []string{}
|
||||
}
|
||||
start := d.ExecDate
|
||||
if s := priced.GetLocationStart(); s != nil {
|
||||
if s := priced.GetLocationStart(); s != nil && s.After(time.Now()) {
|
||||
start = *s
|
||||
}
|
||||
var m map[string]interface{}
|
||||
@@ -219,6 +219,7 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools.
|
||||
if s := priced.GetLocationStart(); s != nil {
|
||||
start = *s
|
||||
}
|
||||
fmt.Println("qdqsd", start, d.ExecDate)
|
||||
end := start.Add(time.Duration(priced.GetExplicitDurationInS()) * time.Second)
|
||||
var m map[string]interface{}
|
||||
b, _ := json.Marshal(priced)
|
||||
|
||||
Reference in New Issue
Block a user