Skip to content

Commit

Permalink
Change flow expires after default to 3 days
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Feb 19, 2025
1 parent 0220202 commit 664b601
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion flows/definition/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (f *flow) GetNode(uuid flows.NodeUUID) flows.Node { return f.nodeMap[uuid]
func (f *flow) ExpireAfter() time.Duration {
if f.expireAfter == 0 {
if f.flowType == flows.FlowTypeMessaging {
return 10080 * time.Minute
return 3 * 24 * time.Hour // 3 days
} else if f.flowType == flows.FlowTypeVoice {
return 5 * time.Minute
}
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/brochure.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
}
Expand Down Expand Up @@ -92,7 +92,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
}
Expand Down Expand Up @@ -314,7 +314,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/date_parse.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"created_on": "2018-07-06T12:30:05.123456789Z",
"expires_on": "2018-07-13T12:30:04.123456789Z",
"expires_on": "2018-07-09T12:30:04.123456789Z",
"step_uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb",
"type": "msg_wait"
}
Expand Down Expand Up @@ -84,7 +84,7 @@
},
{
"created_on": "2018-07-06T12:30:05.123456789Z",
"expires_on": "2018-07-13T12:30:04.123456789Z",
"expires_on": "2018-07-09T12:30:04.123456789Z",
"step_uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb",
"type": "msg_wait"
}
Expand Down Expand Up @@ -294,7 +294,7 @@
},
{
"created_on": "2018-07-06T12:30:05.123456789Z",
"expires_on": "2018-07-13T12:30:04.123456789Z",
"expires_on": "2018-07-09T12:30:04.123456789Z",
"step_uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/default_result.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
}
Expand Down Expand Up @@ -89,7 +89,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
}
Expand Down Expand Up @@ -289,7 +289,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/extra.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
},
{
"created_on": "2018-07-06T12:30:31.123456789Z",
"expires_on": "2018-07-13T12:30:30.123456789Z",
"expires_on": "2018-07-09T12:30:30.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
}
Expand Down Expand Up @@ -264,7 +264,7 @@
},
{
"created_on": "2018-07-06T12:30:31.123456789Z",
"expires_on": "2018-07-13T12:30:30.123456789Z",
"expires_on": "2018-07-09T12:30:30.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
}
Expand Down Expand Up @@ -553,7 +553,7 @@
},
{
"created_on": "2018-07-06T12:30:31.123456789Z",
"expires_on": "2018-07-13T12:30:30.123456789Z",
"expires_on": "2018-07-09T12:30:30.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/nlu_booking.flight.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
}
Expand Down Expand Up @@ -76,7 +76,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
}
Expand Down Expand Up @@ -313,7 +313,7 @@
},
{
"created_on": "2018-07-06T12:30:07.123456789Z",
"expires_on": "2018-07-13T12:30:06.123456789Z",
"expires_on": "2018-07-09T12:30:06.123456789Z",
"step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/subflow.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"created_on": "2018-07-06T12:30:11.123456789Z",
"expires_on": "2018-07-13T12:30:10.123456789Z",
"expires_on": "2018-07-09T12:30:10.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
}
Expand Down Expand Up @@ -156,7 +156,7 @@
},
{
"created_on": "2018-07-06T12:30:11.123456789Z",
"expires_on": "2018-07-13T12:30:10.123456789Z",
"expires_on": "2018-07-09T12:30:10.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
}
Expand Down Expand Up @@ -441,7 +441,7 @@
},
{
"created_on": "2018-07-06T12:30:11.123456789Z",
"expires_on": "2018-07-13T12:30:10.123456789Z",
"expires_on": "2018-07-09T12:30:10.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/subflow.test_resume_with_expiration.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"created_on": "2018-07-06T12:30:11.123456789Z",
"expires_on": "2018-07-13T12:30:10.123456789Z",
"expires_on": "2018-07-09T12:30:10.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
}
Expand Down Expand Up @@ -156,7 +156,7 @@
},
{
"created_on": "2018-07-06T12:30:11.123456789Z",
"expires_on": "2018-07-13T12:30:10.123456789Z",
"expires_on": "2018-07-09T12:30:10.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
}
Expand Down Expand Up @@ -390,7 +390,7 @@
},
{
"created_on": "2018-07-06T12:30:11.123456789Z",
"expires_on": "2018-07-13T12:30:10.123456789Z",
"expires_on": "2018-07-09T12:30:10.123456789Z",
"step_uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9",
"type": "msg_wait"
},
Expand Down
6 changes: 3 additions & 3 deletions test/testdata/runner/subflow_loop_with_wait.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"created_on": "2018-07-06T12:30:13.123456789Z",
"expires_on": "2018-07-13T12:30:12.123456789Z",
"expires_on": "2018-07-09T12:30:12.123456789Z",
"step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671",
"type": "msg_wait"
}
Expand Down Expand Up @@ -167,7 +167,7 @@
},
{
"created_on": "2018-07-06T12:30:13.123456789Z",
"expires_on": "2018-07-13T12:30:12.123456789Z",
"expires_on": "2018-07-09T12:30:12.123456789Z",
"step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671",
"type": "msg_wait"
}
Expand Down Expand Up @@ -463,7 +463,7 @@
},
{
"created_on": "2018-07-06T12:30:13.123456789Z",
"expires_on": "2018-07-13T12:30:12.123456789Z",
"expires_on": "2018-07-09T12:30:12.123456789Z",
"step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671",
"type": "msg_wait"
},
Expand Down
36 changes: 18 additions & 18 deletions test/testdata/runner/subflow_other.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"created_on": "2018-07-06T12:30:15.123456789Z",
"expires_on": "2018-07-13T12:30:14.123456789Z",
"expires_on": "2018-07-09T12:30:14.123456789Z",
"step_uuid": "b88ce93d-4360-4455-a691-235cbe720980",
"type": "msg_wait"
}
Expand Down Expand Up @@ -177,7 +177,7 @@
},
{
"created_on": "2018-07-06T12:30:15.123456789Z",
"expires_on": "2018-07-13T12:30:14.123456789Z",
"expires_on": "2018-07-09T12:30:14.123456789Z",
"step_uuid": "b88ce93d-4360-4455-a691-235cbe720980",
"type": "msg_wait"
}
Expand Down Expand Up @@ -297,7 +297,7 @@
},
{
"created_on": "2018-07-06T12:30:32.123456789Z",
"expires_on": "2018-07-13T12:30:31.123456789Z",
"expires_on": "2018-07-09T12:30:31.123456789Z",
"step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459",
"type": "msg_wait"
}
Expand Down Expand Up @@ -442,7 +442,7 @@
},
{
"created_on": "2018-07-06T12:30:15.123456789Z",
"expires_on": "2018-07-13T12:30:14.123456789Z",
"expires_on": "2018-07-09T12:30:14.123456789Z",
"step_uuid": "b88ce93d-4360-4455-a691-235cbe720980",
"type": "msg_wait"
},
Expand Down Expand Up @@ -485,7 +485,7 @@
},
{
"created_on": "2018-07-06T12:30:32.123456789Z",
"expires_on": "2018-07-13T12:30:31.123456789Z",
"expires_on": "2018-07-09T12:30:31.123456789Z",
"step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459",
"type": "msg_wait"
}
Expand Down Expand Up @@ -646,7 +646,7 @@
},
{
"created_on": "2018-07-06T12:30:54.123456789Z",
"expires_on": "2018-07-13T12:30:53.123456789Z",
"expires_on": "2018-07-09T12:30:53.123456789Z",
"step_uuid": "3ceb7525-c2e1-40b0-bec9-e032f4f9af5f",
"type": "msg_wait"
}
Expand Down Expand Up @@ -773,7 +773,7 @@
},
{
"created_on": "2018-07-06T12:30:54.123456789Z",
"expires_on": "2018-07-13T12:30:53.123456789Z",
"expires_on": "2018-07-09T12:30:53.123456789Z",
"step_uuid": "3ceb7525-c2e1-40b0-bec9-e032f4f9af5f",
"type": "msg_wait"
}
Expand Down Expand Up @@ -832,7 +832,7 @@
},
{
"created_on": "2018-07-06T12:30:15.123456789Z",
"expires_on": "2018-07-13T12:30:14.123456789Z",
"expires_on": "2018-07-09T12:30:14.123456789Z",
"step_uuid": "b88ce93d-4360-4455-a691-235cbe720980",
"type": "msg_wait"
},
Expand Down Expand Up @@ -875,7 +875,7 @@
},
{
"created_on": "2018-07-06T12:30:32.123456789Z",
"expires_on": "2018-07-13T12:30:31.123456789Z",
"expires_on": "2018-07-09T12:30:31.123456789Z",
"step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1065,7 +1065,7 @@
},
{
"created_on": "2018-07-06T12:31:11.123456789Z",
"expires_on": "2018-07-13T12:31:10.123456789Z",
"expires_on": "2018-07-09T12:31:10.123456789Z",
"step_uuid": "f3cbd795-9bb3-4331-ba82-c15b24dd577f",
"type": "msg_wait"
}
Expand Down Expand Up @@ -1184,7 +1184,7 @@
},
{
"created_on": "2018-07-06T12:30:54.123456789Z",
"expires_on": "2018-07-13T12:30:53.123456789Z",
"expires_on": "2018-07-09T12:30:53.123456789Z",
"step_uuid": "3ceb7525-c2e1-40b0-bec9-e032f4f9af5f",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1227,7 +1227,7 @@
},
{
"created_on": "2018-07-06T12:31:11.123456789Z",
"expires_on": "2018-07-13T12:31:10.123456789Z",
"expires_on": "2018-07-09T12:31:10.123456789Z",
"step_uuid": "f3cbd795-9bb3-4331-ba82-c15b24dd577f",
"type": "msg_wait"
}
Expand Down Expand Up @@ -1308,7 +1308,7 @@
},
{
"created_on": "2018-07-06T12:30:15.123456789Z",
"expires_on": "2018-07-13T12:30:14.123456789Z",
"expires_on": "2018-07-09T12:30:14.123456789Z",
"step_uuid": "b88ce93d-4360-4455-a691-235cbe720980",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1351,7 +1351,7 @@
},
{
"created_on": "2018-07-06T12:30:32.123456789Z",
"expires_on": "2018-07-13T12:30:31.123456789Z",
"expires_on": "2018-07-09T12:30:31.123456789Z",
"step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1651,7 +1651,7 @@
},
{
"created_on": "2018-07-06T12:30:54.123456789Z",
"expires_on": "2018-07-13T12:30:53.123456789Z",
"expires_on": "2018-07-09T12:30:53.123456789Z",
"step_uuid": "3ceb7525-c2e1-40b0-bec9-e032f4f9af5f",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1694,7 +1694,7 @@
},
{
"created_on": "2018-07-06T12:31:11.123456789Z",
"expires_on": "2018-07-13T12:31:10.123456789Z",
"expires_on": "2018-07-09T12:31:10.123456789Z",
"step_uuid": "f3cbd795-9bb3-4331-ba82-c15b24dd577f",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1823,7 +1823,7 @@
},
{
"created_on": "2018-07-06T12:30:15.123456789Z",
"expires_on": "2018-07-13T12:30:14.123456789Z",
"expires_on": "2018-07-09T12:30:14.123456789Z",
"step_uuid": "b88ce93d-4360-4455-a691-235cbe720980",
"type": "msg_wait"
},
Expand Down Expand Up @@ -1866,7 +1866,7 @@
},
{
"created_on": "2018-07-06T12:30:32.123456789Z",
"expires_on": "2018-07-13T12:30:31.123456789Z",
"expires_on": "2018-07-09T12:30:31.123456789Z",
"step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459",
"type": "msg_wait"
},
Expand Down
Loading

0 comments on commit 664b601

Please sign in to comment.