mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) communicate with sandbox via standard pipes
Summary: This switches to using stdin/stdout for RPC calls to the sandbox, rather than specially allocated side channels. Plain text error information remains on stderr. The motivation for the change is to simplify use of sandboxes, some of which support extra file descriptors and some of which don't. The new style of communication is made the default, but I'm not committed to this, just that it be easy to switch to if needed. It is possible I'll need to switch the communication method again in the near future. One reason not to make this default would be windows support, which is likely broken since stdin/stdout are by default in text mode. Test Plan: existing tests pass Reviewers: dsagal, alexmojaki Reviewed By: dsagal, alexmojaki Differential Revision: https://phab.getgrist.com/D2897
This commit is contained in:
@@ -13,7 +13,7 @@ import six
|
||||
|
||||
from acl_formula import parse_acl_formula
|
||||
import actions
|
||||
from sandbox import Sandbox
|
||||
from sandbox import get_default_sandbox
|
||||
import engine
|
||||
import migrations
|
||||
import schema
|
||||
@@ -115,8 +115,7 @@ def run(sandbox):
|
||||
sandbox.run()
|
||||
|
||||
def main():
|
||||
sandbox = Sandbox.connected_to_js_pipes()
|
||||
run(sandbox)
|
||||
run(get_default_sandbox())
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user