File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ def get_workflow_inputs(
672672
673673 def get_workflows (self , input : GetWorkflowsInput ) -> GetWorkflowsOutput :
674674 query = sa .select (SystemSchema .workflow_status .c .workflow_uuid ).order_by (
675- SystemSchema .workflow_status .c .created_at .desc ()
675+ SystemSchema .workflow_status .c .created_at .asc ()
676676 )
677677 if input .name :
678678 query = query .where (SystemSchema .workflow_status .c .name == input .name )
@@ -718,7 +718,7 @@ def get_queued_workflows(
718718 SystemSchema .workflow_queue .c .workflow_uuid
719719 == SystemSchema .workflow_status .c .workflow_uuid ,
720720 )
721- .order_by (SystemSchema .workflow_status .c .created_at .desc ())
721+ .order_by (SystemSchema .workflow_status .c .created_at .asc ())
722722 )
723723
724724 if input .get ("name" ):
Original file line number Diff line number Diff line change @@ -905,10 +905,10 @@ def test_send_recv_workflow(topic: str) -> str:
905905
906906 wfs = dbos ._sys_db .get_workflows (gwi )
907907 assert len (wfs .workflow_uuids ) == 2
908- assert wfs .workflow_uuids [1 ] == dest_uuid
909- assert wfs .workflow_uuids [0 ] != dest_uuid
908+ assert wfs .workflow_uuids [0 ] == dest_uuid
909+ assert wfs .workflow_uuids [1 ] != dest_uuid
910910
911- wfi = dbos ._sys_db .get_workflow_info (wfs .workflow_uuids [0 ], False )
911+ wfi = dbos ._sys_db .get_workflow_info (wfs .workflow_uuids [1 ], False )
912912 assert wfi
913913 assert wfi ["name" ] == "<temp>.temp_send_workflow"
914914
Original file line number Diff line number Diff line change @@ -245,8 +245,8 @@ def blocking_step(i: int) -> int:
245245 assert workflow .status == WorkflowStatusString .PENDING .value
246246 assert workflow .queue_name == queue .name
247247 assert workflow .input is not None
248- # Verify newest queue entries appear first
249- assert workflow .input ["args" ][0 ] == queued_steps - i - 1
248+ # Verify oldest queue entries appear first
249+ assert workflow .input ["args" ][0 ] == i
250250 assert workflow .output is None
251251 assert workflow .error is None
252252 assert "blocking_step" in workflow .workflowName
You can’t perform that action at this time.
0 commit comments