Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interrupted: operation canceled #428

Open
eikmei opened this issue Jul 3, 2023 · 1 comment
Open

Interrupted: operation canceled #428

eikmei opened this issue Jul 3, 2023 · 1 comment

Comments

@eikmei
Copy link

eikmei commented Jul 3, 2023

Try to loop array in order to run delete query. Function as below.

wheres.forEach(async (where) => {
        const deleteSql = `DELETE FROM ${tableName} WHERE ${where}`;
        try {
          await destinationClient.queryObject(deleteSql);
        } catch (err) {
          console.log("Error executing query:", err);
          await sourceClient.end();
        }
      })

But get this error

Error executing query: Interrupted: operation canceled
    at async TcpConn.read (deno:ext/net/01_net.js:80:17)
    at async BufReader.read (https://deno.land/[email protected]/io/buffer.ts:383:12)
    at async BufReader.readFull (https://deno.land/[email protected]/io/buffer.ts:415:20)
    at async Connection.#readMessage (https://deno.land/x/[email protected]/connection/connection.ts:152:5)
    at async Connection.#simpleQuery (https://deno.land/x/[email protected]/connection/connection.ts:672:27)
    at async Connection.query (https://deno.land/x/[email protected]/connection/connection.ts:928:16)
@gliluaume
Copy link

Hello @eikmei,
Maybe it will work using a pool as described here: https://deno-postgres.com/#/?id=connection-pools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants