File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed
Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -217,19 +217,6 @@ class HawkAPI {
217217 * Checking env variables
218218 * If at least one path is not transmitted, the variable tlsVerify is undefined
219219 */
220- if (
221- ! [ process . env . TLS_CA_CERT , process . env . TLS_CERT , process . env . TLS_KEY ] . some ( value => value === undefined || value . length === 0 )
222- ) {
223- /*
224- * tlsVerify is used for accounting SDK (currently commented out)
225- * const tlsVerify = {
226- * tlsCaCertPath: `${process.env.TLS_CA_CERT}`,
227- * tlsCertPath: `${process.env.TLS_CERT}`,
228- * tlsKeyPath: `${process.env.TLS_KEY}`,
229- * };
230- */
231- }
232-
233220 /*
234221 * const accounting = new Accounting({
235222 * baseURL: `${process.env.CODEX_ACCOUNTING_URL}`,
Original file line number Diff line number Diff line change @@ -36,14 +36,15 @@ export function composeProjectMetricsKey(
3636 * @returns suffix string (minutely, hourly, daily)
3737 */
3838export function getTimeSeriesSuffix ( groupBy : number ) : string {
39- if ( groupBy === 1 ) {
40- return 'minutely' ;
41- } else if ( groupBy === 60 ) {
42- return 'hourly' ;
43- } else if ( groupBy === 1440 ) {
44- return 'daily' ;
39+ switch ( groupBy ) {
40+ case 1 :
41+ return 'minutely' ;
42+ case 60 :
43+ return 'hourly' ;
44+ case 1440 :
45+ return 'daily' ;
46+ default :
47+ // For custom intervals, fallback to minutely with aggregation
48+ return 'minutely' ;
4549 }
46-
47- // For custom intervals, fallback to minutely with aggregation
48- return 'minutely' ;
4950}
You can’t perform that action at this time.
0 commit comments