|
1 | 1 | """ |
2 | 2 | .. _ref_manage_licensing: |
3 | 3 |
|
4 | | -Manage the DPF licensing logic via the server context |
5 | | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 4 | +Manage the DPF licensing logic using the server context |
| 5 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
6 | 6 |
|
7 | | -This examples shows how to manage the licensing logic of a DPF server using a `ServerContext`. |
| 7 | +This example shows how to manage the licensing logic of a DPF server using a `ServerContext`. |
8 | 8 |
|
9 | | -Preventing DPF from checking licenses out and blocking increments is possible |
10 | | -with the **Entry** context. |
| 9 | +You can prevent DPF from checking licenses out and blocking increments by using the |
| 10 | +**Entry** context. |
11 | 11 |
|
12 | 12 | .. warning:: |
13 | | - As starting an ``InProcess`` server means linking the DPF binaries to your current python |
14 | | - process, you cannot start a new ``InProcess`` server. Thus, if your local ``InProcess`` server |
15 | | - is already **Premium**, you cannot set it back as **Entry**. |
16 | | - ``InProcess`` being the default server type, the proper commands to work as **Entry** should be |
17 | | - set right at the beginning of your script. |
| 13 | + You cannot start a new ``InProcess`` server, as starting an ``InProcess`` server means linking |
| 14 | + the DPF binaries to your current Python process. If your local ``InProcess`` server is already |
| 15 | + set to **Premium**, you cannot set it back to **Entry**. |
| 16 | + Since ``InProcess`` is the default server type, put the commands to set the **Entry** server |
| 17 | + context at the start of your script. |
18 | 18 |
|
19 | 19 | .. note:: |
20 | 20 | This example requires DPF 6.1 (Ansys 2023R2) or above. |
|
35 | 35 | # The context is shown as Entry |
36 | 36 | print(server.context) |
37 | 37 |
|
38 | | -# A server of type InProcess being linked to the current python process, |
| 38 | +# A server of type InProcess being linked to the current Python process, |
39 | 39 | # if an InProcess server already exists as Premium, you cannot set it back as Entry. |
40 | 40 |
|
41 | 41 | ####################################################################################### |
|
75 | 75 | out = op_premium.eval() |
76 | 76 | print(out) |
77 | 77 |
|
78 | | -############################################################################################### |
79 | | -# When Premium, using a LicenseContextManaged allows to control your interaction with a license |
| 78 | +################################################################################################### |
| 79 | +# When Premium, using a LicenseContextManaged allows you to control your interaction with a license |
| 80 | +# It gives direct control over when the license check-out and check-in occur, as well as which |
| 81 | +# license increment is used, and for what maximum duration. |
80 | 82 |
|
81 | 83 | # Use the LicenseContextManager to block a specific increment for a limited duration |
82 | 84 | with dpf.LicenseContextManager(increment_name="preppost", license_timeout_in_seconds=1.0) as lic: |
|
0 commit comments