mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-13 18:06:32 +00:00
Allow data store upsearch to work from within a parallel gateway (#1002)
This commit is contained in:
parent
d1e30f9d91
commit
886f1f5757
@ -115,8 +115,13 @@ class ExecutionStrategy:
|
|||||||
spiff_task: SpiffTask,
|
spiff_task: SpiffTask,
|
||||||
app: flask.app.Flask,
|
app: flask.app.Flask,
|
||||||
user: Any | None,
|
user: Any | None,
|
||||||
|
process_model_identifier: str,
|
||||||
) -> SpiffTask:
|
) -> SpiffTask:
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
|
tld = current_app.config.get("THREAD_LOCAL_DATA")
|
||||||
|
if tld:
|
||||||
|
tld.process_model_identifier = process_model_identifier
|
||||||
|
|
||||||
g.user = user
|
g.user = user
|
||||||
spiff_task.run()
|
spiff_task.run()
|
||||||
return spiff_task
|
return spiff_task
|
||||||
@ -159,6 +164,7 @@ class ExecutionStrategy:
|
|||||||
spiff_task,
|
spiff_task,
|
||||||
current_app._get_current_object(),
|
current_app._get_current_object(),
|
||||||
user,
|
user,
|
||||||
|
process_instance_model.process_model_identifier,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
for future in concurrent.futures.as_completed(futures):
|
for future in concurrent.futures.as_completed(futures):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user