Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

63
Views
Using etcd tansaction with a true valued if statement

In JavaScript, I am trying to make multiple key updates to etcd in 1 transaction. I've filtered the key-value pairs that I want to update before the transaction so basically I don't have any comparisons to do. I want to use it like this:

const client = new Etcd3({ hosts: connectionString });

...

await client.if(true)
                .then(
                    client.put(entry1).value(JSON.stringify(account1, null, 4));
                    client.put(entry2).value(JSON.stringify(account2, null, 4));
                    client.put(entry3).value(JSON.stringify(account3, null, 4));
                    client.put(entry4).value(JSON.stringify(account4, null, 4));
                )
                .else();

is there anything I can put instead of this true that will act the same way?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!