rename column

This commit is contained in:
bparodi@lezzo.org 2024-12-03 11:07:05 +01:00
parent 96e5825406
commit 631de11088
2 changed files with 13 additions and 0 deletions

View file

@ -205,3 +205,11 @@ type RemoveUselessTables () =
override x.Up() =
x.Delete.Table "current_jobs"
|> ignore
[<Migration(20241203_0001L)>]
type RenameCmdInBacklog () =
inherit OnlyUp ()
override x.Up() =
x.Rename.Column("cmd").OnTable("backlog").To("job")
|> ignore

View file

@ -3,6 +3,7 @@ module Bidello.Grains
open Orleans
open System.Threading
open System.Threading.Tasks
open NodaTime
open Bidello.Datatypes
open Bidello.Shell
@ -13,6 +14,7 @@ type IShellGrain =
abstract schedule: CancellationToken -> ChainOfJobs -> ValueTask
type ShellGrain() =
inherit Orleans.Grain ()
@ -40,7 +42,10 @@ type ShellGrain() =
|> Logging.logger.Fatal
let rec run_ (hd: CronJob) (tl: CronJob list) = async {
let start_time = SystemClock.Instance.GetCurrentInstant ()
let! rc = run_job ct hd |> Async.AwaitTask
let end_time = SystemClock.Instance.GetCurrentInstant ()
log hd rc
match rc, tl with
| (Success stdout, hd'::tl')->