Skip to content

Commit 4a8deed

Browse files
committed
10.01.12: Optlock ignored [35], Reduce Sample size
1 parent f6feaf8 commit 4a8deed

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.vscode/ApiLogicServerDev.code-workspace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"sqltools.useNodeRuntime": true,
9898
"workbench.preferredDarkColorTheme": "One Dark Pro Flat",
9999
"workbench.preferredLightColorTheme": "IntelliJ IDEA New UI",
100-
"workbench.colorTheme": "IntelliJ IDEA New UI",
100+
"workbench.colorTheme": "One Dark Pro Flat",
101101
"search.exclude": {
102102
"**api_logic_server_cli/ApiLogicProject/": true,
103103
"**api_logic_server_cli/create_from_model/safrs-react-admin-npm-build": true

api_logic_server_cli/api_logic_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
Called from api_logic_server_cli.py, by instantiating the ProjectRun object.
1313
'''
1414

15-
__version__ = "10.01.11"
15+
__version__ = "10.01.12"
1616
recent_changes = \
1717
f'\n\nRecent Changes:\n' +\
18-
"\t01/10/2024 - 10.01.11: Reduce Sample size, examples, consistent naming, cwd \n"\
18+
"\t01/10/2024 - 10.01.12: Optlock ignored [35], Reduce Sample size, examples, consistent naming, run/cwd \n"\
1919
"\t01/08/2024 - 10.01.07: Default Interpreter for VS Code, Allocation fix, F5 Note, #als \n"\
2020
"\t01/03/2024 - 10.01.00: Quoted col names \n"\
2121
"\t12/21/2023 - 10.00.01: Fix < Python 3.11 \n"\

api_logic_server_cli/prototypes/base/api/system/opt_locking/opt_locking.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,16 @@ def opt_lock_patch(logic_row: LogicRow):
140140
ALSError: "Optimistic Locking error - required CheckSum not present"
141141
"""
142142
logger.debug(f'Opt Lock Patch')
143-
if hasattr(logic_row.row, "replace_opt_locking_attr"):
143+
if args.instance.opt_locking == OptLocking.IGNORED.value:
144+
pass
145+
elif hasattr(logic_row.row, "S_CheckSum"):
144146
as_read_checksum = logic_row.row.replace_opt_locking_attr
145147
old_row_checksum = checksum_old_row(logic_row)
146148
if as_read_checksum != old_row_checksum:
147149
logger.info(f"optimistic lock failure - as-read vs current: {as_read_checksum} vs {old_row_checksum}")
148150
raise ALSError(message="Sorry, row altered by another user - please note changes, cancel and retry")
149151
else:
150-
if args.opt_locking == OptLocking.OPTIONAL.value:
152+
if args.instance.opt_locking == OptLocking.OPTIONAL.value:
151153
logger.debug(f'No CheckSum -- ok, configured as optional')
152154
else:
153155
raise ALSError("Optimistic Locking error - required CheckSum not present")

docker/api_logic_server.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# GA release
2-
# docker buildx build --push -f docker/api_logic_server.Dockerfile --tag apilogicserver/api_logic_server:10.01.07 -o type=image --platform=linux/arm64,linux/amd64 .
2+
# docker buildx build --push -f docker/api_logic_server.Dockerfile --tag apilogicserver/api_logic_server:10.01.12 -o type=image --platform=linux/arm64,linux/amd64 .
33
# docker buildx build --push -f docker/api_logic_server.Dockerfile --tag apilogicserver/api_logic_server:latest -o type=image --platform=linux/arm64,linux/amd64 .
44

55
# Beta - test codespaces with tutorial, API_Fiddle (change .devcontainer.json -> apilogicserver/api_logic_server_x)

0 commit comments

Comments
 (0)