A shared CloudCode task can be created to manage files that need to be shared with other CloudCode tasks. This can be used to share configuration or common functions across multiple CloudCode tasks within the same app.
Version Compatibility
Compatible with version 1.4.2 and later of CloudCode.
A "Shared" task template has been added to assist in creating a task which can be accessed from all other tasks.
Simply select this template when creating a new CloudCode task. A shared task is required to be called "shared" and have the following package.json:
14:27:25.468 [INTERNAL:INFO] Created invocation 'T20180921122725LA5kMEtGoFVajZaKkKuTG6'...
14:27:25.474 [QUEUE:INFO] Moved from state 'CREATED' to 'QUEUED'
14:27:25.510 [QUEUE:INFO] Moved from state 'QUEUED' to 'STARTED'
14:27:27.786 [TASK:INFO] Start 'EDITOR_TEST' request. Process trace ID: 'P20180921122727PBwTsW97AVYn8ks5ZfyEZY'
14:27:27.791 [TASK:INFO] shared: { secret: 'foo' }
14:27:27.791 [TASK:INFO] sharedConfig: { secret: 'bar' }
14:27:27.791 [TASK:INFO] sharedText: secret: "baz"
14:27:27.792 [TASK:INFO] Request complete. Response code: 204. Memory used: 48MB.
14:27:29.101 [QUEUE:INFO] Moved from state 'STARTED' to 'COMPLETED'