Search found 5 matches
- Thu Jun 29, 2023 10:06 am
- Forum: Node.js scripting
- Topic: Database Values as NodeJS Parameters
- Replies: 7
- Views: 21876
Re: Database Values as NodeJS Parameters
Sad story. It only works when the parameters come back fast enough. I penetrated it with ~20 switch jobs sequentially (not even parallel) and all those jobs had the same parameters being read from a database. Don't get me wrong, but 20 test jobs is not even much, this would definitely happen in prod...
- Wed Jun 28, 2023 5:27 pm
- Forum: Node.js scripting
- Topic: Database Values as NodeJS Parameters
- Replies: 7
- Views: 21876
Re: Database Values as NodeJS Parameters
I highly appreciate your help, Thomas. When I try your code, I get: Argument of type '(value: unknown) => void' is not assignable to parameter of type 'number'. because the setTimeout returns void and something else is expected? I was eager enough to "just remove" the _resolve_ keyword/par...
- Wed Jun 21, 2023 12:20 pm
- Forum: Node.js scripting
- Topic: Database Values as NodeJS Parameters
- Replies: 7
- Views: 21876
Re: Database Values as NodeJS Parameters
We experience this even more often. Using variables from "a Database Connection" (via the Database Connection Module) as parameters for scripts seems to be broken. I don't know if this is something that only we experience? If anybody else can confirm this "behavior", this might b...
- Wed Jun 07, 2023 3:03 pm
- Forum: Node.js scripting
- Topic: Database Values as NodeJS Parameters
- Replies: 7
- Views: 21876
Re: Database Values as NodeJS Parameters
The SQL SELECT works within the Switch Flow and the # hashtags are just placeholders as I wrote:
(the hashtags are placeholders for privacy reasons, this part is just an example and works 100%)
(the hashtags are placeholders for privacy reasons, this part is just an example and works 100%)
- Wed Jun 07, 2023 2:49 pm
- Forum: Node.js scripting
- Topic: Database Values as NodeJS Parameters
- Replies: 7
- Views: 21876
Database Values as NodeJS Parameters
We use a SwitchScript to save values in private data fields of the job and this script works perfectly well as a legacy script. We now rewrote it as a NodeJS SwitchScript and it also works like a charm, but NOT when a parameter value for the script comes from a variable that fetches a value from a D...