mirror of
https://github.com/benbusby/farside.git
synced 2025-06-08 10:26:36 +00:00
run as local service
This commit is contained in:
parent
876bc2136b
commit
e9cca35a54
10 changed files with 111 additions and 22 deletions
|
@ -94,15 +94,11 @@ defmodule Farside do
|
|||
end
|
||||
|
||||
def save_results(file, data) do
|
||||
case System.get_env("MIX_ENV") do
|
||||
"prod" ->
|
||||
nil
|
||||
|
||||
_ ->
|
||||
{:ok, file} = File.open(file, [:append])
|
||||
bin = :erlang.term_to_binary(data)
|
||||
IO.binwrite(file, bin)
|
||||
File.close(file)
|
||||
if System.get_env("MIX_ENV") == "dev" do
|
||||
{:ok, file} = File.open(file, [:append])
|
||||
bin = :erlang.term_to_binary(data)
|
||||
IO.binwrite(file, bin)
|
||||
File.close(file)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue