Skip to content

Commit dcddbdd

Browse files
committed
first set the database to be scheduled cause scheduling goes faster than db change
1 parent 550e966 commit dcddbdd

File tree

1 file changed

+3
-6
lines changed
  • services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler

1 file changed

+3
-6
lines changed

services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_publisher.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ async def request_pipeline_scheduling(
1616
project_id: ProjectID,
1717
iteration: Iteration,
1818
) -> None:
19-
# NOTE: we should use the transaction and the asyncpg engine here to ensure 100% consistency
20-
# https://github.com/ITISFoundation/osparc-simcore/issues/6818
21-
# async with transaction_context(get_asyncpg_engine(app)) as connection:
19+
await CompRunsRepository.instance(db_engine).mark_for_scheduling(
20+
user_id=user_id, project_id=project_id, iteration=iteration
21+
)
2222
await rabbitmq_client.publish(
2323
SchedulePipelineRabbitMessage.get_channel_name(),
2424
SchedulePipelineRabbitMessage(
@@ -27,6 +27,3 @@ async def request_pipeline_scheduling(
2727
iteration=iteration,
2828
),
2929
)
30-
await CompRunsRepository.instance(db_engine).mark_for_scheduling(
31-
user_id=user_id, project_id=project_id, iteration=iteration
32-
)

0 commit comments

Comments
 (0)