2024 Feb 02 4:11 PM - edited 2024 Feb 02 4:16 PM
Hello CAP Team, Hi @Daniel7,
I have a CAP application that creates quite huge Excel files and allows also the upload of the edited files. The uploaded files are processed and data is written to S/4HANA. This download and upload processing is quite resource extensive and sometimes blocks the interactive usage of the application. Due to that reason I want to do the processing in a Cloud Foundry Task. Marius Obert lists "Running a data processing script" as one use cases in the blog post CloudFoundryFun #4 – How to use Cloud Foundry Tasks.
So I went forward and created a first prototype with srv/loadDataFromMock.js. As I do not need a CAP Server providing an HTTP endpoint I used (with a hint from @david_kunz2 ) the example from the CAP documentation for the Built-in server.js. What would be great if @sap/cds/server.js would provide directly a way to start the CAP standard server but just without express and a http server.
Best Regards
Gregor
Request clarification before answering.
For executing heavy load tasks and periodic events in CAP you can use the following package:
https://github.com/cap-js-community/event-queue/
https://cap-js-community.github.io/event-queue/
The packages allow you to execute jobs and periodic job asynchronously for every onboarded tenant. The package does not require any additional services or components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
12 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.