Skip to content

Commit

Permalink
efficient writes and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patkivikram committed Sep 5, 2023
1 parent ff923c3 commit 869e2e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dagger/modeler/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ async def create_instance(
else:
if submit_task:
template_instance.status = TaskStatus(

Check warning on line 547 in dagger/modeler/definition.py

View check run for this annotation

Codecov / codecov/patch

dagger/modeler/definition.py#L547

Added line #L547 was not covered by tests
code=TaskStatusEnum.SUBMITTED.name, value=TaskStatusEnum.SUBMITTED.value
code=TaskStatusEnum.SUBMITTED.name,
value=TaskStatusEnum.SUBMITTED.value,
)
await self.app._store_and_create_task(template_instance) # type: ignore
return template_instance
Expand Down
2 changes: 1 addition & 1 deletion dagger/store/stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def execute_system_timer_task(self) -> None: # pragma: no cover
finished = await task.start(workflow_instance)
else:
await task.start(workflow_instance)
await self.app._update_instance(task=workflow_instance) # type: ignore
await self.app._update_instance(task=workflow_instance) # type: ignore
if finished:
await self.remove_trigger(trigger)
if not task or task.status.code in TERMINAL_STATUSES:
Expand Down
6 changes: 4 additions & 2 deletions integration_tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,9 @@ async def simple_data_stream_stop(stream):
async for value in stream:

instance = await workflow_engine.get_instance(running_task_ids[-1])
await instance.stop(runtime_parameters=instance.runtime_parameters, workflow_instance=instance)
await instance.stop(
runtime_parameters=instance.runtime_parameters, workflow_instance=instance
)


@workflow_engine.faust_app.agent(simple_topic)
Expand Down Expand Up @@ -767,7 +769,7 @@ async def simple_data_stream(stream):
complete_by_time=120000,
repartition=False,
seed=rd,
submit_task=True
submit_task=True,
)
templates.append(instance)
running_task_ids.append(instance.id)
Expand Down

0 comments on commit 869e2e7

Please sign in to comment.