Skip to content
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

Microseconds in utc_datetime gave ecto errors #265

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- database

database:
image: timescale/timescaledb:latest-pg14
image: timescale/timescaledb:latest-pg17
restart: on-failure
environment:
POSTGRES_USER: zout
Expand Down
2 changes: 1 addition & 1 deletion lib/zout/data/data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
@doc """
Deletes a Project.
"""
def delete_project(%Project{} = project) do

Check warning on line 76 in lib/zout/data/data.ex

View workflow job for this annotation

GitHub Actions / Build and test

variable "project" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 76 in lib/zout/data/data.ex

View workflow job for this annotation

GitHub Actions / Dialyzer

variable "project" is unused (if the variable is not meant to be used, prefix it with an underscore)
raise "TODO"
end

Expand Down Expand Up @@ -145,7 +145,7 @@
This will consolidate the new ping with the existing ping, to only save intervals,
to prevent ballooning the storage and processing requirements.
"""
def handle_check_result(%Project{id: id}, {status, message, response_time}) do

Check warning on line 148 in lib/zout/data/data.ex

View workflow job for this annotation

GitHub Actions / Build and test

variable "response_time" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 148 in lib/zout/data/data.ex

View workflow job for this annotation

GitHub Actions / Dialyzer

variable "response_time" is unused (if the variable is not meant to be used, prefix it with an underscore)
# Get the latest ping.
# This should not be nil, unless this is the very first ping for a project.
existing_ping =
Expand All @@ -165,7 +165,7 @@
Logger.info("Starting new ping interval")

# Prevent multiple pings with the same end point.
stop = now |> Timex.shift(seconds: 1)
stop = now |> Timex.shift(seconds: 1) |> DateTime.truncate(:second)

Repo.insert!(%Ping{
start: now,
Expand Down Expand Up @@ -244,7 +244,7 @@
Repo.transaction(fn ->
# Insert or find all projects, in a map of slug -> project.
project_map =
Map.new(nodes, fn {[id | _], node} ->

Check warning on line 247 in lib/zout/data/data.ex

View workflow job for this annotation

GitHub Actions / Build and test

variable "node" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 247 in lib/zout/data/data.ex

View workflow job for this annotation

GitHub Actions / Dialyzer

variable "node" is unused (if the variable is not meant to be used, prefix it with an underscore)
# Check if we can find an existing node.
{:ok, slug} = EctoFields.Slug.cast(id)

Expand Down
4 changes: 2 additions & 2 deletions server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ COPY rel rel
RUN mix release

# app stage
FROM alpine:3.17 AS app
FROM alpine:3.20 AS app

# install runtime dependencies
RUN apk add --no-cache libstdc++ openssl ncurses-libs musl-locales openssl1.1-compat
RUN apk add --no-cache libstdc++ openssl ncurses-libs musl-locales

WORKDIR "/app"
RUN chown nobody /app
Expand Down
Loading