GithubHelp home page GithubHelp logo

cds-bug-3's Introduction

Problem description

Requirement

As part of a longer running service to execute a set of functionalities, I would like to update a processing status in a database table.

Problem description

I don't want all updates to be committed at the end of the service execution, but I need incremental commits to the database at the time the status update is triggered. I believe that requires an indepdendent transaction bracket. An example of that is implemented in the transaction handler: synch.js

The solution seems to hang (maybe a db lock?) once the update to the status runs.

Replication of problem

  1. Clone this repository
  2. Run npm install
  3. Run cds watch
  4. Open ./test/synch.http to call the action

the result you should see in the terminal is something like this

[cds] - POST /synch/startSynch 
Run Status [
  {
    ID: '002f90b4-97c1-40c6-881c-484cff305692',
    createdAt: '2023-06-08T15:59:21.838Z',
    createdBy: 'anonymous',
    modifiedAt: '2023-06-08T15:59:21.838Z',
    modifiedBy: 'anonymous',
    entityName: 'User',
    srcDestinationName: 'sf-inno-api',
    sfCompanyId: null,
    fieldsToFilter: null,
    synchProgress: 'Started'
  }
]

problem is that the line console.log('sync') is never reached.

Versions at which the problem occurs:

@sap/cds: 6.8.2
@sap/cds-compiler: 3.9.2
@sap/cds-dk: 6.8.2
@sap/cds-dk (global): 6.8.2
@sap/cds-foss: 4.0.1
@sap/cds-mtx: -- missing --
@sap/eslint-plugin-cds: 2.6.3
Node.js: v18.16.0
cds-bug-3: 1.0.0

cds-bug-3's People

Contributors

martinstenzig avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.