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)
|
||||
HOST := $(shell cat host.secret)
|
||||
|
||||
|
||||
build:
|
||||
cd src && dotnet build --no-restore
|
||||
|
||||
run:
|
||||
cd entrypoint && dotnet run -- --user ${USER} --password ${PASSWORD} -H ${HOST}
|
||||
|
||||
test:
|
||||
cd tests && dotnet test
|
||||
|
||||
restore:
|
||||
dotnet restore && cd src && dotnet build
|
||||
|
||||
clean:
|
||||
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">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\src.fsproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Orleans.Core" Version="8.2.0" />
|
||||
<PackageReference Include="Microsoft.Orleans.Server" Version="8.2.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -16,6 +16,7 @@ let try_ (lambda: (unit -> ValueTask)) (prefix: string) (level: LogEventLevel) =
|
|||
with exn ->
|
||||
let logger = Logging.logger
|
||||
let msg = sprintf "%s - %s" prefix exn.Message
|
||||
printfn "%A" exn.StackTrace
|
||||
|
||||
match level with
|
||||
| LogEventLevel.Verbose -> logger.Debug msg
|
||||
|
|
|
@ -60,7 +60,8 @@ type Bidello(client: IClusterClient) =
|
|||
|> Seq.iter schedule_jobs
|
||||
|
||||
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
|
||||
()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue