-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add temporal_route end-date #6664
base: 4.3
Are you sure you want to change the base?
Conversation
What is the issue now? |
I can see this log, but what does it mean? TEST KazooTests\Applications\Crossbar\SystemConfigConferencesSection (testDefaultApplied) ... ERROR 0.01s too_many_requests Fatal error: Uncaught Kazoo\Api\Exception\RateLimit: too_many_requests in /home/user/make-busy/vendor/2600hz/kazoo-php-sdk/lib/hz2600/Kazoo/HttpClient/HttpClient.php:94 |
When this PR will be merged? |
@@ -29,6 +29,12 @@ | |||
"description": "Whether the rule is enabled", | |||
"type": "boolean" | |||
}, | |||
"end_date": { | |||
"default": 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, we prefer that the absence of the value would mean no end date. Remove the default; end_date
should only have a value if it is a proper, meaningful timestamp.
"end_date": { | ||
"default": 0, | ||
"description": "The date that the rule ends. Zero means no end date", | ||
"support_level": "supported", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support_level
is a 2600Hz-only field to include, please remove.
@@ -51,6 +52,7 @@ | |||
,ordinal = ?RULE_DEFAULT_ORDINAL :: ordinal() | |||
,month = ?RULE_DEFAULT_MONTH :: kz_time:month() | |||
,start_date = ?RULE_DEFAULT_START_DATE :: kz_time:date() | |||
,end_date = ?RULE_DEFAULT_END_DATE :: kz_time:date() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should default to 'undefined'
instead of the tuple. Type would be kz_time:date() | 'undefined'
-spec check_end_date(non_neg_integer(), kz_term:ne_binary(), kz_time:datetime(), integer(), kzd_temporal_rules:doc()) -> 'future' | 'equal' | 'past'. | ||
check_end_date(LSec, TZ, Now, EndDateSeconds, RulesDoc) -> | ||
% TODO, this is an workaround since the from_gregorian_seconds function are crashing on low values such as zero | ||
case EndDateSeconds of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the value for 'undefined'
instead of 0, and I would do it in a function clause:
check_end_date(_LSec, _TZ, _Now, 'undefined', _RulesDoc) -> 'future';
check_end_date(...) ->
I've recreated the PR since there was some issue with the git unstaged files