Skip to content

Commit dc01be1

Browse files
QingengWeiyaugenst-flex
authored andcommitted
chore(webapi): remove unused api
1 parent 8bdf76e commit dc01be1

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

tests/test_web/test_tidy3d_task.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,3 @@ def mock(*args, **kwargs):
376376
task.get_log(LOG_FNAME)
377377
with open(LOG_FNAME) as f:
378378
assert f.read() == "0.3,5.7"
379-
380-
381-
@responses.activate
382-
def test_get_running_tasks(set_api_key):
383-
responses.add(
384-
responses.GET,
385-
f"{Env.current.web_api_endpoint}/tidy3d/py/tasks",
386-
json={"data": [{"taskId": "1234", "status": "queued"}]},
387-
status=200,
388-
)
389-
390-
tasks = SimulationTask.get_running_tasks()
391-
assert len(tasks) == 1

tidy3d/web/core/task_core.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -296,21 +296,6 @@ def get(cls, task_id: str, verbose: bool = True) -> SimulationTask:
296296
task = SimulationTask(**resp) if resp else None
297297
return task
298298

299-
@classmethod
300-
def get_running_tasks(cls) -> list[SimulationTask]:
301-
"""Get a list of running tasks from the server"
302-
303-
Returns
304-
-------
305-
List[:class:`.SimulationTask`]
306-
:class:`.SimulationTask` object containing info about status,
307-
size, credits of task and others.
308-
"""
309-
resp = http.get("tidy3d/py/tasks")
310-
if not resp:
311-
return []
312-
return parse_obj_as(list[SimulationTask], resp)
313-
314299
def delete(self, versions: bool = False):
315300
"""Delete current task from server.
316301

0 commit comments

Comments
 (0)