Skip to content

Reduce gRPC calls #4182

@germa89

Description

@germa89

Maybe we can reduce the number of calls by checking the output after running the command. So if it is empty, then we do the force_output.

And that's the stack I get to wrinqr:
File "/Scratch/vallard/pymapdl/src/ansys/mapdl/core/mapdl_core.py", line 1224, in version
self._version = self.parameters.revision
File "/Scratch/vallard/pymapdl/src/ansys/mapdl/core/parameters.py", line 220, in revision
return float(self._mapdl.get_value("ACTIVE", item1="REV"))
File "/Scratch/vallard/pymapdl/src/ansys/mapdl/core/mapdl_extended.py", line 3157, in get_value
return self._get(
File "/Scratch/vallard/pymapdl/src/ansys/mapdl/core/mapdl_core.py", line 2020, in _get
return self.get(*args, **kwargs)
File "/Scratch/vallard/pymapdl/src/ansys/mapdl/core/mapdl_extended.py", line 2129, in get
with self.force_output:
File "/Scratch/vallard/pymapdl/src/ansys/mapdl/core/mapdl_core.py", line 3100, in enter
if self._parent().wrinqr(1) != 1: # using wrinqr is more reliable than *get

Originally posted by @valallansys in #4179 (comment)

https://github.com/ansys/pymapdl/blob/main/src/ansys/mapdl/core/mapdl_core.py#L1224

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions