fix(simulation): fix SQLite lock on Azure Files and Neo4j clone query
- Add nobrl,cache=strict,nosharesock,actimeo=30 mount options to the Azure Files volume so SQLite can use byte-range locking correctly over SMB (without nobrl, Reddit DB creation fails with 'database is locked') - Fix _execute_neo4j_query to pass parameters as params= keyword arg (was parameters_= which the installed neo4j driver does not accept), restoring per-simulation graph isolation via clone_graph Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a6bf9b3891
commit
df6c77255a
|
|
@ -246,8 +246,8 @@ resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
|
|||
|
||||
// Recursos mínim viable — escalar horitzontalment via rèpliques
|
||||
resources: {
|
||||
cpu: json('0.5')
|
||||
memory: '1Gi'
|
||||
cpu: json('2')
|
||||
memory: '4Gi'
|
||||
}
|
||||
|
||||
// Muntar Azure Files quan s'ha configurat storage
|
||||
|
|
@ -266,6 +266,7 @@ resource containerApp 'Microsoft.App/containerApps@2023-05-01' = {
|
|||
name: 'uploads'
|
||||
storageType: 'AzureFile'
|
||||
storageName: 'uploads'
|
||||
mountOptions: 'nobrl,cache=strict,nosharesock,actimeo=30'
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -521,13 +521,9 @@ class GraphitiBackend(GraphBackend):
|
|||
)
|
||||
|
||||
async def _execute_neo4j_query(self, query: str, parameters: dict = None):
|
||||
"""Execute a raw Cypher query against Neo4j via the sync driver in a thread pool."""
|
||||
loop = asyncio.get_running_loop()
|
||||
result = await loop.run_in_executor(
|
||||
None,
|
||||
lambda: self._client.driver.execute_query(query, **({"parameters_": parameters} if parameters else {}))
|
||||
)
|
||||
return result
|
||||
"""Execute a raw Cypher query against the async Neo4j driver."""
|
||||
kwargs = {"params": parameters} if parameters else {}
|
||||
return await self._client.driver.execute_query(query, **kwargs)
|
||||
|
||||
async def clone_graph(self, src_group_id: str, dst_group_id: str) -> None:
|
||||
"""Clone all nodes and relationships from src_group_id to dst_group_id."""
|
||||
|
|
|
|||
Loading…
Reference in New Issue