trying first deploy
This commit is contained in:
parent
2b362745e2
commit
31a23c1e4f
5 changed files with 23 additions and 16 deletions
8
Makefile
8
Makefile
|
@ -2,14 +2,22 @@ USER := $(shell cat user.secret)
|
||||||
PASSWORD := $(shell cat password.secret)
|
PASSWORD := $(shell cat password.secret)
|
||||||
HOST := $(shell cat host.secret)
|
HOST := $(shell cat host.secret)
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
cd src && dotnet build --no-restore
|
cd src && dotnet build --no-restore
|
||||||
|
|
||||||
run:
|
run:
|
||||||
cd entrypoint && dotnet run -- --user ${USER} --password ${PASSWORD} -H ${HOST}
|
cd entrypoint && dotnet run -- --user ${USER} --password ${PASSWORD} -H ${HOST}
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cd tests && dotnet test
|
cd tests && dotnet test
|
||||||
|
|
||||||
restore:
|
restore:
|
||||||
dotnet restore && cd src && dotnet build
|
dotnet restore && cd src && dotnet build
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm src/bin src/obj tests/bin tests/obj entrypoint/bin entrypoint/obj -fr
|
rm src/bin src/obj tests/bin tests/obj entrypoint/bin entrypoint/obj -fr
|
||||||
|
|
||||||
|
release:
|
||||||
|
cd entrypoint && dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true -c Release
|
||||||
|
cp entrypoint/bin/Release/net8.0/linux-x64/publish/entrypoint bidello
|
||||||
|
|
|
@ -1,20 +1,17 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\src\src.fsproj" />
|
<ProjectReference Include="..\src\src.fsproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Orleans.Core" Version="8.2.0" />
|
<PackageReference Include="Microsoft.Orleans.Core" Version="8.2.0" />
|
||||||
<PackageReference Include="Microsoft.Orleans.Server" Version="8.2.0" />
|
<PackageReference Include="Microsoft.Orleans.Server" Version="8.2.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -16,6 +16,7 @@ let try_ (lambda: (unit -> ValueTask)) (prefix: string) (level: LogEventLevel) =
|
||||||
with exn ->
|
with exn ->
|
||||||
let logger = Logging.logger
|
let logger = Logging.logger
|
||||||
let msg = sprintf "%s - %s" prefix exn.Message
|
let msg = sprintf "%s - %s" prefix exn.Message
|
||||||
|
printfn "%A" exn.StackTrace
|
||||||
|
|
||||||
match level with
|
match level with
|
||||||
| LogEventLevel.Verbose -> logger.Debug msg
|
| LogEventLevel.Verbose -> logger.Debug msg
|
||||||
|
|
|
@ -60,7 +60,8 @@ type Bidello(client: IClusterClient) =
|
||||||
|> Seq.iter schedule_jobs
|
|> Seq.iter schedule_jobs
|
||||||
|
|
||||||
let timeout = next_job_at - now |> _.TotalMilliseconds |> floor |> int32
|
let timeout = next_job_at - now |> _.TotalMilliseconds |> floor |> int32
|
||||||
// printfn $"Waking up in: {timeout}|{next_job_at}"
|
let timeout_print = next_job_at - now |> _.TotalMinutes |> floor |> int32
|
||||||
|
printfn $"Waking up in: {timeout_print}|{next_job_at}" // TODO: remove
|
||||||
let! _wake_up = db |> Database.wait_notification timeout ct
|
let! _wake_up = db |> Database.wait_notification timeout ct
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue