This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22:25:35.638 [info] Setting up some personal video addresses and provisioning clients | |
** (EXIT from #PID<0.47.0>) an exception was raised: | |
** (DBConnection.ConnectionError) failed to checkout using DBConnection.Poolboy | |
(db_connection) lib/db_connection.ex:722: DBConnection.checkout/2 | |
(db_connection) lib/db_connection.ex:623: DBConnection.run/3 | |
(db_connection) lib/db_connection.ex:464: DBConnection.prepare_execute/4 | |
(ecto) lib/ecto/adapters/sql.ex:228: Ecto.Adapters.SQL.sql_call/6 | |
(ecto) lib/ecto/adapters/sql.ex:400: Ecto.Adapters.SQL.execute_and_cache/7 | |
(ecto) lib/ecto/repo/queryable.ex:127: Ecto.Repo.Queryable.execute/5 | |
(ecto) lib/ecto/repo/queryable.ex:40: Ecto.Repo.Queryable.all/4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select a.id, sum(summable_val) val, ar | |
from | |
(select id, array_agg(distinct t) ar | |
from | |
(select id, unnest(aint) as t from a group by 1,2) u | |
group by 1) x | |
join a on x.id = a.id | |
group by 1,3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conn | |
|> put_status(:unprocessable_entity) | |
|> json(%{key => render(Safari.ChangesetView, "error.json", changeset: changeset)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repo.all( | |
from o in Outcrop, | |
inner_join: r in assoc(o, :region), | |
inner_join: l in assoc(r, :location), | |
inner_join: s in Study, on: s.outcrop_id == o.id, | |
inner_join: p in assoc(s, :project), | |
inner_join: po in assoc(p, :owners), | |
select: %{ | |
id: o.id, | |
name: o.name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Application.get_env(:safari, :basic_auth_secured, false) do | |
authed = fn | |
"devtesting", "devtesting" -> :authorized | |
_, _ -> :unauthorized | |
end | |
plug PlugBasicAuth, validation: authed | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Safari.Endpoint do | |
use Phoenix.Endpoint, otp_app: :safari | |
socket "/socket", Safari.UserSocket | |
# Serve at "/" the static files from "priv/static" directory. | |
# | |
# You should set gzip to true if you are running phoenix.digest | |
# when deploying your static files in production. | |
plug Plug.Static, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> [info] module=Plug.Logger function=call/2 POST /api/v1/study/262/cross_section | |
[debug] module=Phoenix.Logger function=phoenix_controller_call/3 Processing by Safari.SupportingObjects.CrossSectionController.create/2 | |
Parameters: %{"cross_section" => %{"author" => "Dylan", "comments" => "", "description" => "This is a test!!!", "name" => "Test Cross Section", "scale" => ""}, "study_id" => "262"} | |
Pipelines: [:api] | |
[info] module=Plug.Logger function=call/2 Sent 500 in 16ms | |
[error] #PID<0.3965.0> running Safari.Endpoint terminated | |
Server: localhost:4000 (http) | |
Request: POST /api/v1/study/262/cross_section | |
** (exit) an exception was raised: | |
** (Ecto.NoPrimaryKeyFieldError) schema `Safari.SupportingObjects.CrossSectionSafariFile` has no primary key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ro乽Ƚ退iex(4)> path = Application.get_env(:safari, :virtual_outcrop_path) | |
"C:\\Users\\olivermt/Documents/filestorage/virtual_outcrop" | |
iex(5)> path | |
"C:\\Users\\olivermt/Documents/filestorage/virtual_outcrop" | |
iex(6)> File.exists?(path) | |
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO study_descriptions(study_id, stratigraphy, environments, notables, analogues, safari, literature, additional_resources) VALUES (SELECT study.id, stratigraphy, environments, notables, analogues, safari, literature, additional_resources | |
FROM outcrop | |
INNER JOIN study ON outcrop.id = study.outcrop_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[error] #PID<0.1267.0> running Core.Endpoint terminated | |
Server: localhost:4000 (http) | |
Request: PUT /api/v1/company/123/user/182/pexip_vmr/1389 | |
** (exit) an exception was raised: | |
** (FunctionClauseError) no function clause matching in String.Unicode.next_grapheme_size/1 | |
(elixir) unicode/unicode.ex:32: String.Unicode.next_grapheme_size(nil) | |
(elixir) unicode/unicode.ex:185: String.Unicode.length/1 | |
(core) web/models/pexip/vmr.ex:52: Core.Pexip.VMR.validate_pins/1 | |
(core) web/service/pexip/vmr_service.ex:13: Core.Pexip.VMRService.update_vmr/2 | |
(core) web/controllers/pexip/vmr_controller.ex:144: Core.Pexip.VMRController.do_update/4 |