@@ -470,8 +470,6 @@ model Project {
470
470
alertStorages ProjectAlertStorage []
471
471
bulkActionGroups BulkActionGroup []
472
472
BackgroundWorkerFile BackgroundWorkerFile []
473
- waitpoints Waitpoint []
474
- taskRunWaitpoints TaskRunWaitpoint []
475
473
}
476
474
477
475
enum ProjectVersion {
@@ -1113,8 +1111,6 @@ model TaskAttempt {
1113
1111
createdAt DateTime @default (now () )
1114
1112
updatedAt DateTime @updatedAt
1115
1113
1116
- executionSnapshot TaskRunExecutionSnapshot []
1117
-
1118
1114
@@unique ([taskId , number ] )
1119
1115
}
1120
1116
@@ -1658,8 +1654,6 @@ model TaskRun {
1658
1654
number Int @default (0 )
1659
1655
friendlyId String @unique
1660
1656
1661
- engine RunEngineVersion @default (V1 )
1662
-
1663
1657
status TaskRunStatus @default (PENDING )
1664
1658
1665
1659
idempotencyKey String ?
@@ -1681,12 +1675,8 @@ model TaskRun {
1681
1675
project Project @relation (fields : [projectId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1682
1676
projectId String
1683
1677
1684
- // The specific queue this run is in
1685
1678
queue String
1686
1679
1687
- /// The main queue that this run is part of
1688
- masterQueue String @default (" main " )
1689
-
1690
1680
createdAt DateTime @default (now () )
1691
1681
updatedAt DateTime @updatedAt
1692
1682
@@ -1718,16 +1708,9 @@ model TaskRun {
1718
1708
expiredAt DateTime ?
1719
1709
maxAttempts Int ?
1720
1710
1721
- ///When this run is finished, the waitpoint will be marked as completed
1722
- associatedWaitpoint Waitpoint ?
1723
-
1724
- ///If there are any blocked waitpoints, the run won't be executed
1725
- blockedByWaitpoints TaskRunWaitpoint []
1726
-
1727
1711
batchItems BatchTaskRunItem []
1728
1712
dependency TaskRunDependency ?
1729
1713
CheckpointRestoreEvent CheckpointRestoreEvent []
1730
- executionSnapshot TaskRunExecutionSnapshot []
1731
1714
1732
1715
alerts ProjectAlert []
1733
1716
@@ -1857,131 +1840,6 @@ enum TaskRunStatus {
1857
1840
TIMED_OUT
1858
1841
}
1859
1842
1860
- enum RunEngineVersion {
1861
- /// The original version that uses marqs v1 and Graphile
1862
- V1
1863
- V2
1864
- }
1865
-
1866
- /// Used by the RunEngine during TaskRun execution
1867
- /// It has the required information to transactionally progress a run through states,
1868
- /// and prevent side effects like heartbeats failing a run that has progressed.
1869
- /// It is optimised for performance and is designed to be cleared at some point,
1870
- /// so there are no cascading relationships to other models.
1871
- model TaskRunExecutionSnapshot {
1872
- id String @id @default (cuid () )
1873
-
1874
- /// This should never be V1
1875
- engine RunEngineVersion @default (V2 )
1876
-
1877
- /// The execution status
1878
- executionStatus TaskRunExecutionStatus
1879
- /// For debugging
1880
- description String
1881
-
1882
- /// Run
1883
- runId String
1884
- run TaskRun @relation (fields : [runId ] , references : [id ] )
1885
- runStatus TaskRunStatus
1886
-
1887
- /// Attempt
1888
- currentAttemptId String ?
1889
- currentAttempt TaskAttempt ? @relation (fields : [currentAttemptId ] , references : [id ] )
1890
- currentAttemptStatus TaskAttemptStatus ?
1891
-
1892
- /// todo Checkpoint
1893
-
1894
- /// These are only ever appended, so we don't need updatedAt
1895
- createdAt DateTime @default (now () )
1896
-
1897
- ///todo machine spec?
1898
-
1899
- ///todo worker
1900
-
1901
- /// Used to get the latest state quickly
1902
- @@index ([runId , createdAt (sort : Desc ) ] )
1903
- }
1904
-
1905
- enum TaskRunExecutionStatus {
1906
- RUN_CREATED
1907
- DEQUEUED_FOR_EXECUTION
1908
- EXECUTING
1909
- BLOCKED_BY_WAITPOINTS
1910
- FINISHED
1911
- }
1912
-
1913
- /// A Waitpoint blocks a run from continuing until it's completed
1914
- /// If there's a waitpoint blocking a run, it shouldn't be in the queue
1915
- model Waitpoint {
1916
- id String @id @default (cuid () )
1917
-
1918
- type WaitpointType
1919
- status WaitpointStatus @default (PENDING )
1920
-
1921
- completedAt DateTime ?
1922
-
1923
- /// If it's an Event type waitpoint, this is the event. It can also be provided for the DATETIME type
1924
- idempotencyKey String
1925
- userProvidedIdempotencyKey Boolean
1926
-
1927
- /// If an idempotencyKey is no longer active, we store it here and generate a new one for the idempotencyKey field.
1928
- /// This is a workaround because Prisma doesn't support partial indexes.
1929
- inactiveIdempotencyKey String ?
1930
-
1931
- /// If it's a RUN type waitpoint, this is the associated run
1932
- completedByTaskRunId String ? @unique
1933
- completedByTaskRun TaskRun ? @relation (fields : [completedByTaskRunId ] , references : [id ] , onDelete : SetNull )
1934
-
1935
- /// If it's a DATETIME type waitpoint, this is the date
1936
- completedAfter DateTime ?
1937
-
1938
- /// The runs this waitpoint is blocking
1939
- blockingTaskRuns TaskRunWaitpoint []
1940
-
1941
- /// When completed, an output can be stored here
1942
- output String ?
1943
- outputType String @default (" application/json " )
1944
-
1945
- project Project @relation (fields : [projectId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1946
- projectId String
1947
-
1948
- createdAt DateTime @default (now () )
1949
- updatedAt DateTime @updatedAt
1950
-
1951
- @@unique ([projectId , idempotencyKey ] )
1952
- }
1953
-
1954
- enum WaitpointType {
1955
- RUN
1956
- DATETIME
1957
- EVENT
1958
- }
1959
-
1960
- enum WaitpointStatus {
1961
- PENDING
1962
- COMPLETED
1963
- }
1964
-
1965
- model TaskRunWaitpoint {
1966
- id String @id @default (cuid () )
1967
-
1968
- taskRun TaskRun @relation (fields : [taskRunId ] , references : [id ] )
1969
- taskRunId String
1970
-
1971
- waitpoint Waitpoint @relation (fields : [waitpointId ] , references : [id ] )
1972
- waitpointId String
1973
-
1974
- project Project @relation (fields : [projectId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
1975
- projectId String
1976
-
1977
- createdAt DateTime @default (now () )
1978
- updatedAt DateTime @updatedAt
1979
-
1980
- @@unique ([taskRunId , waitpointId ] )
1981
- @@index ([taskRunId ] )
1982
- @@index ([waitpointId ] )
1983
- }
1984
-
1985
1843
model TaskRunTag {
1986
1844
id String @id @default (cuid () )
1987
1845
name String
@@ -2011,7 +1869,7 @@ model TaskRunDependency {
2011
1869
checkpointEvent CheckpointRestoreEvent ? @relation (fields : [checkpointEventId ] , references : [id ] , onDelete : Cascade , onUpdate : Cascade )
2012
1870
checkpointEventId String ? @unique
2013
1871
2014
- /// An attempt that is dependent on this task run.
1872
+ /// An attempt that is dependent on this task run.
2015
1873
dependentAttempt TaskRunAttempt ? @relation (fields : [dependentAttemptId ] , references : [id ] )
2016
1874
dependentAttemptId String ?
2017
1875
0 commit comments