Add options to control lifetime of global variables in embedded Python

Description

It is sometimes useful to be able to set up global variables in embedded Python code that persist from one call to the next, or which are set in one embedded function and read in another.

Proposed syntax is:

EMBED(Python: globalscope('load.ecl'),persist('query'))

The parameter to globalscope names a scope that allows separate embed functions to control that they will share with only certain other embed functions

The parameter to persist indicates the lifetime and scope of the shared globals, and can be 'query', 'global' or 'workunit'
'query' means until the query finishes - other instances of the same query running at the same time will have independent versions of the globals.
'workunit' means until the workunit is unloaded (the same as 'query' except on Roxie)
'global' means indefinitely, shared by all workunits, until the engine next restarts (for eclagent this is the same as 'workunit').

Conclusion

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Fix versions

Affects versions

Created November 17, 2016 at 7:04 PM
Updated November 28, 2016 at 10:11 AM
Resolved November 28, 2016 at 10:11 AM