fix timing issue
All checks were successful
dev test / test (push) Successful in 23s
dev test / vulnCheck (push) Successful in 29s
dev test / Ci-Lint (push) Successful in 27s
${{ github.actor }} executed Build Push Prod / build (push) Successful in 3m25s
${{ github.actor }} executed Build Push Prod / deploy (push) Successful in 20s
All checks were successful
dev test / test (push) Successful in 23s
dev test / vulnCheck (push) Successful in 29s
dev test / Ci-Lint (push) Successful in 27s
${{ github.actor }} executed Build Push Prod / build (push) Successful in 3m25s
${{ github.actor }} executed Build Push Prod / deploy (push) Successful in 20s
This commit is contained in:
parent
2ffdb3fdba
commit
8dae98db2b
@ -17,4 +17,5 @@ WORKDIR /app
|
|||||||
COPY --from=builder /app/bin/us-dop-api /usr/bin/
|
COPY --from=builder /app/bin/us-dop-api /usr/bin/
|
||||||
COPY --from=builder /app/assets/ /app/assets/
|
COPY --from=builder /app/assets/ /app/assets/
|
||||||
RUN apk add --no-cache tzdata
|
RUN apk add --no-cache tzdata
|
||||||
|
|
||||||
ENTRYPOINT /usr/bin/us-dop-api
|
ENTRYPOINT /usr/bin/us-dop-api
|
||||||
|
|||||||
@ -14,13 +14,13 @@ func ParseTimeAmount(timeFrame, timeAmount string) (timeSearch time.Duration, er
|
|||||||
|
|
||||||
switch timeFrame {
|
switch timeFrame {
|
||||||
case "hour":
|
case "hour":
|
||||||
timeSearch = 60 * 1 * time.Duration(timeInt) * time.Hour
|
timeSearch = time.Duration(timeInt) * time.Hour
|
||||||
case "day":
|
case "day":
|
||||||
timeSearch = 60 * 24 * time.Duration(timeInt) * time.Hour
|
timeSearch = 24 * time.Duration(timeInt) * time.Hour
|
||||||
case "week":
|
case "week":
|
||||||
timeSearch = (60 * 24 * 7 * time.Duration(timeInt)) * time.Hour
|
timeSearch = (24 * 7 * time.Duration(timeInt)) * time.Hour
|
||||||
case "month":
|
case "month":
|
||||||
timeSearch = (60 * 24 * 7 * 4) * time.Hour
|
timeSearch = (24 * 7 * 4) * time.Hour
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
return timeSearch, err
|
return timeSearch, err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user