Skip to content

Commit 8c6e407

Browse files
committed
fix
1 parent ebb9ee6 commit 8c6e407

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/service-library/tests/rabbitmq/test_rabbitmq_rpc_interfaces_async_jobs.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,40 +69,40 @@ def _get_task(self, job_id: AsyncJobId) -> asyncio.Task:
6969
raise JobMissingError(job_id=f"{job_id}")
7070

7171
async def status(
72-
self, job_id: AsyncJobId, job_id_data: AsyncJobFilter
72+
self, job_id: AsyncJobId, job_filter: AsyncJobFilter
7373
) -> AsyncJobStatus:
74-
assert job_id_data
74+
assert job_filter
7575
task = self._get_task(job_id)
7676
return AsyncJobStatus(
7777
job_id=job_id,
7878
progress=ProgressReport(actual_value=1 if task.done() else 0.3),
7979
done=task.done(),
8080
)
8181

82-
async def cancel(self, job_id: AsyncJobId, job_id_data: AsyncJobFilter) -> None:
82+
async def cancel(self, job_id: AsyncJobId, job_filter: AsyncJobFilter) -> None:
8383
assert job_id
84-
assert job_id_data
84+
assert job_filter
8585
task = self._get_task(job_id)
8686
task.cancel()
8787

8888
async def result(
89-
self, job_id: AsyncJobId, job_id_data: AsyncJobFilter
89+
self, job_id: AsyncJobId, job_filter: AsyncJobFilter
9090
) -> AsyncJobResult:
91-
assert job_id_data
91+
assert job_filter
9292
task = self._get_task(job_id)
9393
assert task.done()
9494
return AsyncJobResult(
9595
result={
9696
"data": task.result(),
9797
"job_id": job_id,
98-
"job_id_data": job_id_data,
98+
"job_id_data": job_filter,
9999
}
100100
)
101101

102102
async def list_jobs(
103-
self, filter_: str, job_id_data: AsyncJobFilter
103+
self, filter_: str, job_filter: AsyncJobFilter
104104
) -> list[AsyncJobGet]:
105-
assert job_id_data
105+
assert job_filter
106106
assert filter_ is not None
107107

108108
return [
@@ -113,8 +113,8 @@ async def list_jobs(
113113
for t in self.tasks
114114
]
115115

116-
async def submit(self, job_id_data: AsyncJobFilter) -> AsyncJobGet:
117-
assert job_id_data
116+
async def submit(self, job_filter: AsyncJobFilter) -> AsyncJobGet:
117+
assert job_filter
118118
job_id = faker.uuid4(cast_to=None)
119119
self.tasks.append(asyncio.create_task(_slow_task(), name=f"{job_id}"))
120120
return AsyncJobGet(job_id=job_id, job_name="fake_job_name")
@@ -156,7 +156,7 @@ async def test_async_jobs_methods(
156156
rpc_client,
157157
rpc_namespace=namespace,
158158
job_id=job_id,
159-
job_id_data=job_filter,
159+
job_filter=job_filter,
160160
)
161161

162162

@@ -246,6 +246,6 @@ async def test_submit_and_wait(
246246
result={
247247
"data": None,
248248
"job_id": job_composed_result.status.job_id,
249-
"job_id_data": job_filter,
249+
"job_filter": job_filter,
250250
}
251251
)

0 commit comments

Comments
 (0)