rename column
This commit is contained in:
parent
96e5825406
commit
631de11088
2 changed files with 13 additions and 0 deletions
|
@ -205,3 +205,11 @@ type RemoveUselessTables () =
|
||||||
override x.Up() =
|
override x.Up() =
|
||||||
x.Delete.Table "current_jobs"
|
x.Delete.Table "current_jobs"
|
||||||
|> ignore
|
|> ignore
|
||||||
|
|
||||||
|
[<Migration(20241203_0001L)>]
|
||||||
|
type RenameCmdInBacklog () =
|
||||||
|
|
||||||
|
inherit OnlyUp ()
|
||||||
|
override x.Up() =
|
||||||
|
x.Rename.Column("cmd").OnTable("backlog").To("job")
|
||||||
|
|> ignore
|
||||||
|
|
|
@ -3,6 +3,7 @@ module Bidello.Grains
|
||||||
open Orleans
|
open Orleans
|
||||||
open System.Threading
|
open System.Threading
|
||||||
open System.Threading.Tasks
|
open System.Threading.Tasks
|
||||||
|
open NodaTime
|
||||||
|
|
||||||
open Bidello.Datatypes
|
open Bidello.Datatypes
|
||||||
open Bidello.Shell
|
open Bidello.Shell
|
||||||
|
@ -13,6 +14,7 @@ type IShellGrain =
|
||||||
abstract schedule: CancellationToken -> ChainOfJobs -> ValueTask
|
abstract schedule: CancellationToken -> ChainOfJobs -> ValueTask
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type ShellGrain() =
|
type ShellGrain() =
|
||||||
inherit Orleans.Grain ()
|
inherit Orleans.Grain ()
|
||||||
|
|
||||||
|
@ -40,7 +42,10 @@ type ShellGrain() =
|
||||||
|> Logging.logger.Fatal
|
|> Logging.logger.Fatal
|
||||||
|
|
||||||
let rec run_ (hd: CronJob) (tl: CronJob list) = async {
|
let rec run_ (hd: CronJob) (tl: CronJob list) = async {
|
||||||
|
let start_time = SystemClock.Instance.GetCurrentInstant ()
|
||||||
let! rc = run_job ct hd |> Async.AwaitTask
|
let! rc = run_job ct hd |> Async.AwaitTask
|
||||||
|
let end_time = SystemClock.Instance.GetCurrentInstant ()
|
||||||
|
|
||||||
log hd rc
|
log hd rc
|
||||||
match rc, tl with
|
match rc, tl with
|
||||||
| (Success stdout, hd'::tl')->
|
| (Success stdout, hd'::tl')->
|
||||||
|
|
Loading…
Reference in a new issue