[INFO] cloning repository https://github.com/tinyest-org/task_runner [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tinyest-org/task_runner" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftinyest-org%2Ftask_runner", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftinyest-org%2Ftask_runner'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] eec5b908b759dac96ae133d26a8da27b2fafe0b9 [INFO] checking tinyest-org/task_runner against try#95813608313bff49cfc1afc393a946a3c085b772 for pr-148946 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftinyest-org%2Ftask_runner" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-5-tc2/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/tinyest-org/task_runner [INFO] finished tweaking git repo https://github.com/tinyest-org/task_runner [INFO] tweaked toml for git repo https://github.com/tinyest-org/task_runner written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tinyest-org/task_runner on toolchain 95813608313bff49cfc1afc393a946a3c085b772 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+95813608313bff49cfc1afc393a946a3c085b772" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/tinyest-org/task_runner already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+95813608313bff49cfc1afc393a946a3c085b772" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+95813608313bff49cfc1afc393a946a3c085b772" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d7ea21d3e4fb225550568f92daf586a9f3c1848bf32800a94d1cba8f957597ee [INFO] running `Command { std: "docker" "start" "-a" "d7ea21d3e4fb225550568f92daf586a9f3c1848bf32800a94d1cba8f957597ee", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d7ea21d3e4fb225550568f92daf586a9f3c1848bf32800a94d1cba8f957597ee", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d7ea21d3e4fb225550568f92daf586a9f3c1848bf32800a94d1cba8f957597ee", kill_on_drop: false }` [INFO] [stdout] d7ea21d3e4fb225550568f92daf586a9f3c1848bf32800a94d1cba8f957597ee [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+95813608313bff49cfc1afc393a946a3c085b772" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5c31f8476413ebeeefdd4ae2ac499cce23e2ecc1a5b0c8e766d1a199b226c7c9 [INFO] running `Command { std: "docker" "start" "-a" "5c31f8476413ebeeefdd4ae2ac499cce23e2ecc1a5b0c8e766d1a199b226c7c9", kill_on_drop: false }` [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Compiling jobserver v0.1.33 [INFO] [stderr] Checking socket2 v0.5.9 [INFO] [stderr] Checking mio v1.0.4 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Compiling cc v1.2.24 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling darling_core v0.20.11 [INFO] [stderr] Checking tokio v1.45.1 [INFO] [stderr] Checking icu_normalizer v2.0.0 [INFO] [stderr] Checking local-waker v0.1.4 [INFO] [stderr] Compiling zstd-safe v7.2.4 [INFO] [stderr] Checking idna_adapter v1.2.1 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Compiling winnow v0.7.11 [INFO] [stderr] Compiling toml_write v0.1.2 [INFO] [stderr] Compiling pq-sys v0.7.1 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Compiling tracing-core v0.1.33 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling zstd-sys v2.0.15+zstd.1.5.7 [INFO] [stderr] Compiling bytes v1.10.1 [INFO] [stderr] Checking serde_json v1.0.140 [INFO] [stderr] Compiling serde_spanned v0.6.9 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Compiling bytestring v1.4.0 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Compiling darling_macro v0.20.11 [INFO] [stderr] Checking postgres-protocol v0.6.8 [INFO] [stderr] Compiling derive_more-impl v2.0.1 [INFO] [stderr] Compiling darling v0.20.11 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Compiling dsl_auto_type v0.1.3 [INFO] [stderr] Checking phf_shared v0.11.3 [INFO] [stderr] Checking idna v1.0.3 [INFO] [stderr] Checking tokio-util v0.7.15 [INFO] [stderr] Checking actix-rt v2.10.0 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking brotli-decompressor v5.0.0 [INFO] [stderr] Checking actix-utils v3.0.1 [INFO] [stderr] Compiling async-trait v0.1.88 [INFO] [stderr] Compiling diesel_table_macro_syntax v0.2.0 [INFO] [stderr] Compiling der_derive v0.7.3 [INFO] [stderr] Compiling cookie v0.16.2 [INFO] [stderr] Compiling rustls v0.23.27 [INFO] [stderr] Checking actix-service v2.0.3 [INFO] [stderr] Checking const-oid v0.9.6 [INFO] [stderr] Checking flagset v0.4.7 [INFO] [stderr] Compiling regex-lite v0.1.6 [INFO] [stderr] Checking chrono v0.4.41 [INFO] [stderr] Checking rustls-webpki v0.103.3 [INFO] [stderr] Compiling actix-router v0.5.3 [INFO] [stderr] Checking der v0.7.10 [INFO] [stderr] Compiling toml v0.8.23 [INFO] [stderr] Checking derive_more v2.0.1 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Checking brotli v8.0.1 [INFO] [stderr] Compiling diesel_derives v2.2.5 [INFO] [stderr] Checking h2 v0.3.26 [INFO] [stderr] Checking actix-codec v0.5.2 [INFO] [stderr] Checking url v2.5.4 [INFO] [stderr] Checking hyper v1.6.0 [INFO] [stderr] Checking phf v0.11.3 [INFO] [stderr] Checking postgres-types v0.2.9 [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking uuid v1.17.0 [INFO] [stderr] Checking local-channel v0.1.5 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Checking webpki-roots v1.0.0 [INFO] [stderr] Checking whoami v1.6.0 [INFO] [stderr] Compiling prometheus v0.13.4 [INFO] [stderr] Checking foldhash v0.1.5 [INFO] [stderr] Checking language-tags v0.3.2 [INFO] [stderr] Checking raw-cpuid v10.7.0 [INFO] [stderr] Checking tokio-postgres v0.7.13 [INFO] [stderr] Checking hyper-util v0.1.12 [INFO] [stderr] Checking tokio-rustls v0.26.2 [INFO] [stderr] Checking spki v0.7.3 [INFO] [stderr] Compiling migrations_internals v2.2.0 [INFO] [stderr] Compiling actix-web-codegen v4.3.0 [INFO] [stderr] Checking actix-server v2.6.0 [INFO] [stderr] Compiling actix-macros v0.2.4 [INFO] [stderr] Compiling pin-project-internal v1.1.10 [INFO] [stderr] Checking impl-more v0.1.9 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Checking tower v0.5.2 [INFO] [stderr] Checking hyper-rustls v0.27.6 [INFO] [stderr] Compiling migrations_macros v2.2.0 [INFO] [stderr] Checking x509-cert v0.2.5 [INFO] [stderr] Checking quanta v0.10.1 [INFO] [stderr] Checking webpki-roots v0.26.11 [INFO] [stderr] Checking bb8 v0.8.6 [INFO] [stderr] Checking pin-project v1.1.10 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking env_filter v0.1.3 [INFO] [stderr] Checking scoped-futures v0.1.4 [INFO] [stderr] Compiling task-runner v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking jiff v0.2.14 [INFO] [stderr] Checking reqwest v0.12.15 [INFO] [stderr] Compiling diesel-derive-enum v3.0.0-beta.1 [INFO] [stderr] Checking rustls-platform-verifier v0.5.3 [INFO] [stderr] Checking actix v0.13.5 [INFO] [stderr] Checking diesel v2.2.10 [INFO] [stderr] Checking tokio-postgres-rustls v0.13.0 [INFO] [stderr] Checking zstd v0.13.3 [INFO] [stderr] Checking actix-http v3.11.0 [INFO] [stderr] Checking env_logger v0.11.8 [INFO] [stderr] Checking actix-web v4.11.0 [INFO] [stderr] Checking actix-web-prometheus v0.1.2 [INFO] [stderr] Checking diesel-async v0.5.2 [INFO] [stderr] Checking diesel_migrations v2.2.0 [INFO] [stdout] warning: unused import: `schema::sql_types::ActionKind` [INFO] [stdout] --> src/db_operation.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | schema::sql_types::ActionKind, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `schema::task::status` [INFO] [stdout] --> src/workers.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | rule::Strategy, schema::task::status, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `schema::sql_types::ActionKind` [INFO] [stdout] --> src/db_operation.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | schema::sql_types::ActionKind, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `schema::task::status` [INFO] [stdout] --> src/workers.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | rule::Strategy, schema::task::status, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:91:6 [INFO] [stdout] | [INFO] [stdout] 91 | .get_results::(conn) [INFO] [stdout] | ^^^^^^^^^^^ multiple `get_results` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 75 ~ let updated = diesel_async::RunQueryDsl::get_results(diesel::update( [INFO] [stdout] 76 + task.filter( [INFO] [stdout] 77 + status [INFO] [stdout] 78 + .eq(models::StatusKind::Running) [INFO] [stdout] 79 + .and(started_at.is_not_null()) [INFO] [stdout] 80 + .and(last_updated.lt(now.into_sql::() [INFO] [stdout] 81 + - (PgInterval::from_microseconds(1_000_000).into_sql::() [INFO] [stdout] 82 + * timeout))), [INFO] [stdout] 83 + ), [INFO] [stdout] 84 + ) [INFO] [stdout] 85 + .set(( [INFO] [stdout] 86 + status.eq(models::StatusKind::Failure), [INFO] [stdout] 87 + ended_at.eq(now), [INFO] [stdout] 88 + failure_reason.eq(TIMEOUT_REASON), [INFO] [stdout] 89 + )) [INFO] [stdout] 90 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 75 ~ let updated = diesel::RunQueryDsl::get_results(diesel::update( [INFO] [stdout] 76 + task.filter( [INFO] [stdout] 77 + status [INFO] [stdout] 78 + .eq(models::StatusKind::Running) [INFO] [stdout] 79 + .and(started_at.is_not_null()) [INFO] [stdout] 80 + .and(last_updated.lt(now.into_sql::() [INFO] [stdout] 81 + - (PgInterval::from_microseconds(1_000_000).into_sql::() [INFO] [stdout] 82 + * timeout))), [INFO] [stdout] 83 + ), [INFO] [stdout] 84 + ) [INFO] [stdout] 85 + .set(( [INFO] [stdout] 86 + status.eq(models::StatusKind::Failure), [INFO] [stdout] 87 + ended_at.eq(now), [INFO] [stdout] 88 + failure_reason.eq(TIMEOUT_REASON), [INFO] [stdout] 89 + )) [INFO] [stdout] 90 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:101:10 [INFO] [stdout] | [INFO] [stdout] 101 | .get_results(conn) [INFO] [stdout] | ^^^^^^^^^^^ multiple `get_results` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 98 ~ let tasks = diesel_async::RunQueryDsl::get_results(task [INFO] [stdout] 99 + .filter(status.eq(models::StatusKind::Pending)) [INFO] [stdout] 100 + .order(created_at.asc()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 98 ~ let tasks = diesel::RunQueryDsl::get_results(task [INFO] [stdout] 99 + .filter(status.eq(models::StatusKind::Pending)) [INFO] [stdout] 100 + .order(created_at.asc()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:148:6 [INFO] [stdout] | [INFO] [stdout] 148 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 130 ~ let res = diesel_async::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 131 + task.filter( [INFO] [stdout] 132 + id.eq(task_id) [INFO] [stdout] 133 + // lock failed tasks for update [INFO] [stdout] 134 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 135 + ), [INFO] [stdout] 136 + ) [INFO] [stdout] 137 + .set(( [INFO] [stdout] 138 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 139 + dto.new_success.map(|e| success.eq(success + e)), [INFO] [stdout] 140 + dto.new_failures.map(|e| failures.eq(failures + e)), [INFO] [stdout] 141 + // if success or failure then update ended_at [INFO] [stdout] 142 + s.filter(|e| e == &models::StatusKind::Success || e == &models::StatusKind::Failure) [INFO] [stdout] 143 + .map(|_| ended_at.eq(diesel::dsl::now)), [INFO] [stdout] 144 + dto.metadata.map(|m| metadata.eq(m)), [INFO] [stdout] 145 + dto.status.as_ref().map(|m| status.eq(m)), [INFO] [stdout] 146 + dto.failure_reason.map(|m| failure_reason.eq(m)), [INFO] [stdout] 147 + )), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 130 ~ let res = diesel::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 131 + task.filter( [INFO] [stdout] 132 + id.eq(task_id) [INFO] [stdout] 133 + // lock failed tasks for update [INFO] [stdout] 134 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 135 + ), [INFO] [stdout] 136 + ) [INFO] [stdout] 137 + .set(( [INFO] [stdout] 138 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 139 + dto.new_success.map(|e| success.eq(success + e)), [INFO] [stdout] 140 + dto.new_failures.map(|e| failures.eq(failures + e)), [INFO] [stdout] 141 + // if success or failure then update ended_at [INFO] [stdout] 142 + s.filter(|e| e == &models::StatusKind::Success || e == &models::StatusKind::Failure) [INFO] [stdout] 143 + .map(|_| ended_at.eq(diesel::dsl::now)), [INFO] [stdout] 144 + dto.metadata.map(|m| metadata.eq(m)), [INFO] [stdout] 145 + dto.status.as_ref().map(|m| status.eq(m)), [INFO] [stdout] 146 + dto.failure_reason.map(|m| failure_reason.eq(m)), [INFO] [stdout] 147 + )), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:171:10 [INFO] [stdout] | [INFO] [stdout] 171 | .first::(conn) [INFO] [stdout] | ^^^^^ multiple `first` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 169 ~ let t = diesel_async::RunQueryDsl::first(task [INFO] [stdout] 170 + .filter(id.eq(task_id)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 169 ~ let t = diesel::RunQueryDsl::first(task [INFO] [stdout] 170 + .filter(id.eq(task_id)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/db_operation.rs:176:27 [INFO] [stdout] | [INFO] [stdout] 176 | let actions = Action::belonging_to(&base_task) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:206:14 [INFO] [stdout] | [INFO] [stdout] 206 | .load::(conn) [INFO] [stdout] | ^^^^ multiple `load` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 197 ~ diesel_async::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 198 + .filter( [INFO] [stdout] 199 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 200 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 201 + .and(status.eq(dto_status)) [INFO] [stdout] 202 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 203 + ) [INFO] [stdout] 204 + .limit(page_size) [INFO] [stdout] 205 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 197 ~ diesel::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 198 + .filter( [INFO] [stdout] 199 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 200 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 201 + .and(status.eq(dto_status)) [INFO] [stdout] 202 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 203 + ) [INFO] [stdout] 204 + .limit(page_size) [INFO] [stdout] 205 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:217:14 [INFO] [stdout] | [INFO] [stdout] 217 | .load::(conn) [INFO] [stdout] | ^^^^ multiple `load` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 209 ~ diesel_async::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 210 + .filter( [INFO] [stdout] 211 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 212 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 213 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 214 + ) [INFO] [stdout] 215 + .limit(page_size) [INFO] [stdout] 216 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 209 ~ diesel::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 210 + .filter( [INFO] [stdout] 211 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 212 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 213 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 214 + ) [INFO] [stdout] 215 + .limit(page_size) [INFO] [stdout] 216 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/db_operation.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | let result = if let Some(dto_status) = filter.status { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | let tasks: Vec = result [INFO] [stdout] | ------ type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `result` an explicit type [INFO] [stdout] | [INFO] [stdout] 196 | let result: /* Type */ = if let Some(dto_status) = filter.status { [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:267:14 [INFO] [stdout] | [INFO] [stdout] 267 | .get_result::(conn) [INFO] [stdout] | ^^^^^^^^^^ multiple `get_result` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 260 ~ let count = diesel_async::RunQueryDsl::get_result(task [INFO] [stdout] 261 + .filter( [INFO] [stdout] 262 + kind.eq(&matcher.kind) [INFO] [stdout] 263 + .and(status.eq(&matcher.status)) [INFO] [stdout] 264 + .and(metadata.contains(m)), [INFO] [stdout] 265 + ) [INFO] [stdout] 266 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 260 ~ let count = diesel::RunQueryDsl::get_result(task [INFO] [stdout] 261 + .filter( [INFO] [stdout] 262 + kind.eq(&matcher.kind) [INFO] [stdout] 263 + .and(status.eq(&matcher.status)) [INFO] [stdout] 264 + .and(metadata.contains(m)), [INFO] [stdout] 265 + ) [INFO] [stdout] 266 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/db_operation.rs:260:21 [INFO] [stdout] | [INFO] [stdout] 260 | let count = task [INFO] [stdout] | _____________________^ [INFO] [stdout] 261 | | .filter( [INFO] [stdout] 262 | | kind.eq(&matcher.kind) [INFO] [stdout] 263 | | .and(status.eq(&matcher.status)) [INFO] [stdout] ... | [INFO] [stdout] 267 | | .get_result::(conn) [INFO] [stdout] 268 | | .await [INFO] [stdout] | |__________________^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:300:10 [INFO] [stdout] | [INFO] [stdout] 300 | .get_results(conn) [INFO] [stdout] | ^^^^^^^^^^^ multiple `get_results` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `InsertStatement` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 297 ~ let r = diesel::RunQueryDsl::get_results(diesel::insert_into(action) [INFO] [stdout] 298 + .values(items) [INFO] [stdout] 299 + .returning(Action::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 297 ~ let r = diesel_async::RunQueryDsl::get_results(diesel::insert_into(action) [INFO] [stdout] 298 + .values(items) [INFO] [stdout] 299 + .returning(Action::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:334:10 [INFO] [stdout] | [INFO] [stdout] 334 | .get_result(conn) [INFO] [stdout] | ^^^^^^^^^^ multiple `get_result` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `InsertStatement` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 331 ~ let new_task = diesel::RunQueryDsl::get_result(diesel::insert_into(task) [INFO] [stdout] 332 + .values(new_task) [INFO] [stdout] 333 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 331 ~ let new_task = diesel_async::RunQueryDsl::get_result(diesel::insert_into(task) [INFO] [stdout] 332 + .values(new_task) [INFO] [stdout] 333 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:368:10 [INFO] [stdout] | [INFO] [stdout] 368 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 359 ~ diesel_async::RunQueryDsl::execute(diesel::update(task.filter(id.eq(t.id))) [INFO] [stdout] 360 + .set(( [INFO] [stdout] 361 + task_status.eq(sql( [INFO] [stdout] 362 + "CASE WHEN task.status = 'pending' THEN 'running' ELSE task.status END", [INFO] [stdout] 363 + )), [INFO] [stdout] 364 + // These fields are always updated [INFO] [stdout] 365 + started_at.eq(now), [INFO] [stdout] 366 + last_updated.eq(now), [INFO] [stdout] 367 + )), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 359 ~ diesel::RunQueryDsl::execute(diesel::update(task.filter(id.eq(t.id))) [INFO] [stdout] 360 + .set(( [INFO] [stdout] 361 + task_status.eq(sql( [INFO] [stdout] 362 + "CASE WHEN task.status = 'pending' THEN 'running' ELSE task.status END", [INFO] [stdout] 363 + )), [INFO] [stdout] 364 + // These fields are always updated [INFO] [stdout] 365 + started_at.eq(now), [INFO] [stdout] 366 + last_updated.eq(now), [INFO] [stdout] 367 + )), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:385:10 [INFO] [stdout] | [INFO] [stdout] 385 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 383 ~ diesel_async::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 384 + .set(status.eq(StatusKind::Paused)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 383 ~ diesel::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 384 + .set(status.eq(StatusKind::Paused)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:179:22 [INFO] [stdout] | [INFO] [stdout] 179 | .get_result::(conn) [INFO] [stdout] | ^^^^^^^^^^ multiple `get_result` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 172 ~ let count = diesel_async::RunQueryDsl::get_result(task [INFO] [stdout] 173 + .filter( [INFO] [stdout] 174 + kind.eq(&concurency_rule.matcher.kind) [INFO] [stdout] 175 + .and(status.eq(&concurency_rule.matcher.status)) [INFO] [stdout] 176 + .and(metadata.contains(m)), [INFO] [stdout] 177 + ) [INFO] [stdout] 178 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 172 ~ let count = diesel::RunQueryDsl::get_result(task [INFO] [stdout] 173 + .filter( [INFO] [stdout] 174 + kind.eq(&concurency_rule.matcher.kind) [INFO] [stdout] 175 + .and(status.eq(&concurency_rule.matcher.status)) [INFO] [stdout] 176 + .and(metadata.contains(m)), [INFO] [stdout] 177 + ) [INFO] [stdout] 178 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:172:29 [INFO] [stdout] | [INFO] [stdout] 172 | let count = task [INFO] [stdout] | _____________________________^ [INFO] [stdout] 173 | | .filter( [INFO] [stdout] 174 | | kind.eq(&concurency_rule.matcher.kind) [INFO] [stdout] 175 | | .and(status.eq(&concurency_rule.matcher.status)) [INFO] [stdout] ... | [INFO] [stdout] 179 | | .get_result::(conn) [INFO] [stdout] 180 | | .await [INFO] [stdout] | |__________________________^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:215:10 [INFO] [stdout] | [INFO] [stdout] 215 | .load::(conn) [INFO] [stdout] | ^^^^ multiple `load` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 213 ~ let actions = diesel_async::RunQueryDsl::load(Action::belonging_to(&task) [INFO] [stdout] 214 + .filter(trigger.eq(TriggerKind::Start)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 213 ~ let actions = diesel::RunQueryDsl::load(Action::belonging_to(&task) [INFO] [stdout] 214 + .filter(trigger.eq(TriggerKind::Start)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let actions = Action::belonging_to(&task) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 218 | for act in actions.iter() { [INFO] [stdout] | ------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `actions` an explicit type [INFO] [stdout] | [INFO] [stdout] 213 | let actions: /* Type */ = Action::belonging_to(&task) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:247:41 [INFO] [stdout] | [INFO] [stdout] 247 | let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] | ^^^^^ multiple `first` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 247 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 247 + let t = diesel_async::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 247 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 247 + let t = diesel::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:248:19 [INFO] [stdout] | [INFO] [stdout] 248 | let actions = Action::belonging_to(&t) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:248:9 [INFO] [stdout] | [INFO] [stdout] 248 | let actions = Action::belonging_to(&t) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 252 | for act in actions.iter() { [INFO] [stdout] | ------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `actions` an explicit type [INFO] [stdout] | [INFO] [stdout] 248 | let actions: /* Type */ = Action::belonging_to(&t) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:277:41 [INFO] [stdout] | [INFO] [stdout] 277 | let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] | ^^^^^ multiple `first` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 277 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 277 + let t = diesel_async::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 277 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 277 + let t = diesel::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:284:17 [INFO] [stdout] | [INFO] [stdout] 284 | let actions = Action::belonging_to(&t) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 288 | for act in actions.iter() { [INFO] [stdout] | ------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `actions` an explicit type [INFO] [stdout] | [INFO] [stdout] 284 | let actions: /* Type */ = Action::belonging_to(&t) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:314:10 [INFO] [stdout] | [INFO] [stdout] 314 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 312 ~ diesel_async::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 313 + .set(status.eq(StatusKind::Canceled)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 312 ~ diesel::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 313 + .set(status.eq(StatusKind::Canceled)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:386:6 [INFO] [stdout] | [INFO] [stdout] 386 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 374 ~ let _res = diesel_async::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 375 + task.filter( [INFO] [stdout] 376 + id.eq(task_id) [INFO] [stdout] 377 + // lock failed tasks for update [INFO] [stdout] 378 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 379 + ), [INFO] [stdout] 380 + ) [INFO] [stdout] 381 + .set(( [INFO] [stdout] 382 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 383 + success.eq(success + entry.success.into_inner()), [INFO] [stdout] 384 + failures.eq(failures + entry.failures.into_inner()), [INFO] [stdout] 385 + )), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 374 ~ let _res = diesel::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 375 + task.filter( [INFO] [stdout] 376 + id.eq(task_id) [INFO] [stdout] 377 + // lock failed tasks for update [INFO] [stdout] 378 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 379 + ), [INFO] [stdout] 380 + ) [INFO] [stdout] 381 + .set(( [INFO] [stdout] 382 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 383 + success.eq(success + entry.success.into_inner()), [INFO] [stdout] 384 + failures.eq(failures + entry.failures.into_inner()), [INFO] [stdout] 385 + )), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:91:6 [INFO] [stdout] | [INFO] [stdout] 91 | .get_results::(conn) [INFO] [stdout] | ^^^^^^^^^^^ multiple `get_results` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 75 ~ let updated = diesel_async::RunQueryDsl::get_results(diesel::update( [INFO] [stdout] 76 + task.filter( [INFO] [stdout] 77 + status [INFO] [stdout] 78 + .eq(models::StatusKind::Running) [INFO] [stdout] 79 + .and(started_at.is_not_null()) [INFO] [stdout] 80 + .and(last_updated.lt(now.into_sql::() [INFO] [stdout] 81 + - (PgInterval::from_microseconds(1_000_000).into_sql::() [INFO] [stdout] 82 + * timeout))), [INFO] [stdout] 83 + ), [INFO] [stdout] 84 + ) [INFO] [stdout] 85 + .set(( [INFO] [stdout] 86 + status.eq(models::StatusKind::Failure), [INFO] [stdout] 87 + ended_at.eq(now), [INFO] [stdout] 88 + failure_reason.eq(TIMEOUT_REASON), [INFO] [stdout] 89 + )) [INFO] [stdout] 90 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 75 ~ let updated = diesel::RunQueryDsl::get_results(diesel::update( [INFO] [stdout] 76 + task.filter( [INFO] [stdout] 77 + status [INFO] [stdout] 78 + .eq(models::StatusKind::Running) [INFO] [stdout] 79 + .and(started_at.is_not_null()) [INFO] [stdout] 80 + .and(last_updated.lt(now.into_sql::() [INFO] [stdout] 81 + - (PgInterval::from_microseconds(1_000_000).into_sql::() [INFO] [stdout] 82 + * timeout))), [INFO] [stdout] 83 + ), [INFO] [stdout] 84 + ) [INFO] [stdout] 85 + .set(( [INFO] [stdout] 86 + status.eq(models::StatusKind::Failure), [INFO] [stdout] 87 + ended_at.eq(now), [INFO] [stdout] 88 + failure_reason.eq(TIMEOUT_REASON), [INFO] [stdout] 89 + )) [INFO] [stdout] 90 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:101:10 [INFO] [stdout] | [INFO] [stdout] 101 | .get_results(conn) [INFO] [stdout] | ^^^^^^^^^^^ multiple `get_results` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 98 ~ let tasks = diesel_async::RunQueryDsl::get_results(task [INFO] [stdout] 99 + .filter(status.eq(models::StatusKind::Pending)) [INFO] [stdout] 100 + .order(created_at.asc()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 98 ~ let tasks = diesel::RunQueryDsl::get_results(task [INFO] [stdout] 99 + .filter(status.eq(models::StatusKind::Pending)) [INFO] [stdout] 100 + .order(created_at.asc()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:148:6 [INFO] [stdout] | [INFO] [stdout] 148 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 130 ~ let res = diesel_async::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 131 + task.filter( [INFO] [stdout] 132 + id.eq(task_id) [INFO] [stdout] 133 + // lock failed tasks for update [INFO] [stdout] 134 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 135 + ), [INFO] [stdout] 136 + ) [INFO] [stdout] 137 + .set(( [INFO] [stdout] 138 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 139 + dto.new_success.map(|e| success.eq(success + e)), [INFO] [stdout] 140 + dto.new_failures.map(|e| failures.eq(failures + e)), [INFO] [stdout] 141 + // if success or failure then update ended_at [INFO] [stdout] 142 + s.filter(|e| e == &models::StatusKind::Success || e == &models::StatusKind::Failure) [INFO] [stdout] 143 + .map(|_| ended_at.eq(diesel::dsl::now)), [INFO] [stdout] 144 + dto.metadata.map(|m| metadata.eq(m)), [INFO] [stdout] 145 + dto.status.as_ref().map(|m| status.eq(m)), [INFO] [stdout] 146 + dto.failure_reason.map(|m| failure_reason.eq(m)), [INFO] [stdout] 147 + )), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 130 ~ let res = diesel::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 131 + task.filter( [INFO] [stdout] 132 + id.eq(task_id) [INFO] [stdout] 133 + // lock failed tasks for update [INFO] [stdout] 134 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 135 + ), [INFO] [stdout] 136 + ) [INFO] [stdout] 137 + .set(( [INFO] [stdout] 138 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 139 + dto.new_success.map(|e| success.eq(success + e)), [INFO] [stdout] 140 + dto.new_failures.map(|e| failures.eq(failures + e)), [INFO] [stdout] 141 + // if success or failure then update ended_at [INFO] [stdout] 142 + s.filter(|e| e == &models::StatusKind::Success || e == &models::StatusKind::Failure) [INFO] [stdout] 143 + .map(|_| ended_at.eq(diesel::dsl::now)), [INFO] [stdout] 144 + dto.metadata.map(|m| metadata.eq(m)), [INFO] [stdout] 145 + dto.status.as_ref().map(|m| status.eq(m)), [INFO] [stdout] 146 + dto.failure_reason.map(|m| failure_reason.eq(m)), [INFO] [stdout] 147 + )), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:171:10 [INFO] [stdout] | [INFO] [stdout] 171 | .first::(conn) [INFO] [stdout] | ^^^^^ multiple `first` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 169 ~ let t = diesel_async::RunQueryDsl::first(task [INFO] [stdout] 170 + .filter(id.eq(task_id)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 169 ~ let t = diesel::RunQueryDsl::first(task [INFO] [stdout] 170 + .filter(id.eq(task_id)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/db_operation.rs:176:27 [INFO] [stdout] | [INFO] [stdout] 176 | let actions = Action::belonging_to(&base_task) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:206:14 [INFO] [stdout] | [INFO] [stdout] 206 | .load::(conn) [INFO] [stdout] | ^^^^ multiple `load` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 197 ~ diesel_async::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 198 + .filter( [INFO] [stdout] 199 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 200 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 201 + .and(status.eq(dto_status)) [INFO] [stdout] 202 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 203 + ) [INFO] [stdout] 204 + .limit(page_size) [INFO] [stdout] 205 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 197 ~ diesel::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 198 + .filter( [INFO] [stdout] 199 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 200 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 201 + .and(status.eq(dto_status)) [INFO] [stdout] 202 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 203 + ) [INFO] [stdout] 204 + .limit(page_size) [INFO] [stdout] 205 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:217:14 [INFO] [stdout] | [INFO] [stdout] 217 | .load::(conn) [INFO] [stdout] | ^^^^ multiple `load` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 209 ~ diesel_async::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 210 + .filter( [INFO] [stdout] 211 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 212 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 213 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 214 + ) [INFO] [stdout] 215 + .limit(page_size) [INFO] [stdout] 216 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 209 ~ diesel::RunQueryDsl::load(task.offset(offset) [INFO] [stdout] 210 + .filter( [INFO] [stdout] 211 + name.like(format!("%{}%", filter.name.unwrap_or("".to_string()))) [INFO] [stdout] 212 + .and(kind.like(format!("%{}%", filter.kind.unwrap_or("".to_string())))) [INFO] [stdout] 213 + .and(metadata.contains(m.unwrap_or(json!({})))), [INFO] [stdout] 214 + ) [INFO] [stdout] 215 + .limit(page_size) [INFO] [stdout] 216 + .order(created_at.desc()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/db_operation.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | let result = if let Some(dto_status) = filter.status { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 221 | let tasks: Vec = result [INFO] [stdout] | ------ type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `result` an explicit type [INFO] [stdout] | [INFO] [stdout] 196 | let result: /* Type */ = if let Some(dto_status) = filter.status { [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:267:14 [INFO] [stdout] | [INFO] [stdout] 267 | .get_result::(conn) [INFO] [stdout] | ^^^^^^^^^^ multiple `get_result` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 260 ~ let count = diesel_async::RunQueryDsl::get_result(task [INFO] [stdout] 261 + .filter( [INFO] [stdout] 262 + kind.eq(&matcher.kind) [INFO] [stdout] 263 + .and(status.eq(&matcher.status)) [INFO] [stdout] 264 + .and(metadata.contains(m)), [INFO] [stdout] 265 + ) [INFO] [stdout] 266 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 260 ~ let count = diesel::RunQueryDsl::get_result(task [INFO] [stdout] 261 + .filter( [INFO] [stdout] 262 + kind.eq(&matcher.kind) [INFO] [stdout] 263 + .and(status.eq(&matcher.status)) [INFO] [stdout] 264 + .and(metadata.contains(m)), [INFO] [stdout] 265 + ) [INFO] [stdout] 266 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/db_operation.rs:260:21 [INFO] [stdout] | [INFO] [stdout] 260 | let count = task [INFO] [stdout] | _____________________^ [INFO] [stdout] 261 | | .filter( [INFO] [stdout] 262 | | kind.eq(&matcher.kind) [INFO] [stdout] 263 | | .and(status.eq(&matcher.status)) [INFO] [stdout] ... | [INFO] [stdout] 267 | | .get_result::(conn) [INFO] [stdout] 268 | | .await [INFO] [stdout] | |__________________^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:300:10 [INFO] [stdout] | [INFO] [stdout] 300 | .get_results(conn) [INFO] [stdout] | ^^^^^^^^^^^ multiple `get_results` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `InsertStatement` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 297 ~ let r = diesel::RunQueryDsl::get_results(diesel::insert_into(action) [INFO] [stdout] 298 + .values(items) [INFO] [stdout] 299 + .returning(Action::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 297 ~ let r = diesel_async::RunQueryDsl::get_results(diesel::insert_into(action) [INFO] [stdout] 298 + .values(items) [INFO] [stdout] 299 + .returning(Action::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:334:10 [INFO] [stdout] | [INFO] [stdout] 334 | .get_result(conn) [INFO] [stdout] | ^^^^^^^^^^ multiple `get_result` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `InsertStatement` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 331 ~ let new_task = diesel::RunQueryDsl::get_result(diesel::insert_into(task) [INFO] [stdout] 332 + .values(new_task) [INFO] [stdout] 333 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 331 ~ let new_task = diesel_async::RunQueryDsl::get_result(diesel::insert_into(task) [INFO] [stdout] 332 + .values(new_task) [INFO] [stdout] 333 + .returning(Task::as_returning()), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:368:10 [INFO] [stdout] | [INFO] [stdout] 368 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 359 ~ diesel_async::RunQueryDsl::execute(diesel::update(task.filter(id.eq(t.id))) [INFO] [stdout] 360 + .set(( [INFO] [stdout] 361 + task_status.eq(sql( [INFO] [stdout] 362 + "CASE WHEN task.status = 'pending' THEN 'running' ELSE task.status END", [INFO] [stdout] 363 + )), [INFO] [stdout] 364 + // These fields are always updated [INFO] [stdout] 365 + started_at.eq(now), [INFO] [stdout] 366 + last_updated.eq(now), [INFO] [stdout] 367 + )), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 359 ~ diesel::RunQueryDsl::execute(diesel::update(task.filter(id.eq(t.id))) [INFO] [stdout] 360 + .set(( [INFO] [stdout] 361 + task_status.eq(sql( [INFO] [stdout] 362 + "CASE WHEN task.status = 'pending' THEN 'running' ELSE task.status END", [INFO] [stdout] 363 + )), [INFO] [stdout] 364 + // These fields are always updated [INFO] [stdout] 365 + started_at.eq(now), [INFO] [stdout] 366 + last_updated.eq(now), [INFO] [stdout] 367 + )), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/db_operation.rs:385:10 [INFO] [stdout] | [INFO] [stdout] 385 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 383 ~ diesel_async::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 384 + .set(status.eq(StatusKind::Paused)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 383 ~ diesel::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 384 + .set(status.eq(StatusKind::Paused)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:179:22 [INFO] [stdout] | [INFO] [stdout] 179 | .get_result::(conn) [INFO] [stdout] | ^^^^^^^^^^ multiple `get_result` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 172 ~ let count = diesel_async::RunQueryDsl::get_result(task [INFO] [stdout] 173 + .filter( [INFO] [stdout] 174 + kind.eq(&concurency_rule.matcher.kind) [INFO] [stdout] 175 + .and(status.eq(&concurency_rule.matcher.status)) [INFO] [stdout] 176 + .and(metadata.contains(m)), [INFO] [stdout] 177 + ) [INFO] [stdout] 178 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 172 ~ let count = diesel::RunQueryDsl::get_result(task [INFO] [stdout] 173 + .filter( [INFO] [stdout] 174 + kind.eq(&concurency_rule.matcher.kind) [INFO] [stdout] 175 + .and(status.eq(&concurency_rule.matcher.status)) [INFO] [stdout] 176 + .and(metadata.contains(m)), [INFO] [stdout] 177 + ) [INFO] [stdout] 178 + .count(), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:172:29 [INFO] [stdout] | [INFO] [stdout] 172 | let count = task [INFO] [stdout] | _____________________________^ [INFO] [stdout] 173 | | .filter( [INFO] [stdout] 174 | | kind.eq(&concurency_rule.matcher.kind) [INFO] [stdout] 175 | | .and(status.eq(&concurency_rule.matcher.status)) [INFO] [stdout] ... | [INFO] [stdout] 179 | | .get_result::(conn) [INFO] [stdout] 180 | | .await [INFO] [stdout] | |__________________________^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:215:10 [INFO] [stdout] | [INFO] [stdout] 215 | .load::(conn) [INFO] [stdout] | ^^^^ multiple `load` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 213 ~ let actions = diesel_async::RunQueryDsl::load(Action::belonging_to(&task) [INFO] [stdout] 214 + .filter(trigger.eq(TriggerKind::Start)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 213 ~ let actions = diesel::RunQueryDsl::load(Action::belonging_to(&task) [INFO] [stdout] 214 + .filter(trigger.eq(TriggerKind::Start)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:213:9 [INFO] [stdout] | [INFO] [stdout] 213 | let actions = Action::belonging_to(&task) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 218 | for act in actions.iter() { [INFO] [stdout] | ------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `actions` an explicit type [INFO] [stdout] | [INFO] [stdout] 213 | let actions: /* Type */ = Action::belonging_to(&task) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:247:41 [INFO] [stdout] | [INFO] [stdout] 247 | let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] | ^^^^^ multiple `first` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 247 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 247 + let t = diesel_async::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 247 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 247 + let t = diesel::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:248:19 [INFO] [stdout] | [INFO] [stdout] 248 | let actions = Action::belonging_to(&t) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:248:9 [INFO] [stdout] | [INFO] [stdout] 248 | let actions = Action::belonging_to(&t) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 252 | for act in actions.iter() { [INFO] [stdout] | ------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `actions` an explicit type [INFO] [stdout] | [INFO] [stdout] 248 | let actions: /* Type */ = Action::belonging_to(&t) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:277:41 [INFO] [stdout] | [INFO] [stdout] 277 | let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] | ^^^^^ multiple `first` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `SelectStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 277 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 277 + let t = diesel_async::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 277 - let t = task.filter(id.eq(task_id)).first::(conn).await?; [INFO] [stdout] 277 + let t = diesel::RunQueryDsl::first(task.filter(id.eq(task_id)), conn).await?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed [INFO] [stdout] --> src/workers.rs:284:17 [INFO] [stdout] | [INFO] [stdout] 284 | let actions = Action::belonging_to(&t) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 288 | for act in actions.iter() { [INFO] [stdout] | ------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `actions` an explicit type [INFO] [stdout] | [INFO] [stdout] 284 | let actions: /* Type */ = Action::belonging_to(&t) [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:314:10 [INFO] [stdout] | [INFO] [stdout] 314 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 312 ~ diesel_async::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 313 + .set(status.eq(StatusKind::Canceled)), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 312 ~ diesel::RunQueryDsl::execute(diesel::update(task.filter(id.eq(task_id))) [INFO] [stdout] 313 + .set(status.eq(StatusKind::Canceled)), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0034]: multiple applicable items in scope [INFO] [stdout] --> src/workers.rs:386:6 [INFO] [stdout] | [INFO] [stdout] 386 | .execute(conn) [INFO] [stdout] | ^^^^^^^ multiple `execute` found [INFO] [stdout] | [INFO] [stdout] = note: candidate #1 is defined in an impl of the trait `diesel_async::RunQueryDsl` for the type `T` [INFO] [stdout] = note: candidate #2 is defined in an impl of the trait `diesel::RunQueryDsl` for the type `UpdateStatement` [INFO] [stdout] help: disambiguate the method for candidate #1 [INFO] [stdout] | [INFO] [stdout] 374 ~ let _res = diesel_async::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 375 + task.filter( [INFO] [stdout] 376 + id.eq(task_id) [INFO] [stdout] 377 + // lock failed tasks for update [INFO] [stdout] 378 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 379 + ), [INFO] [stdout] 380 + ) [INFO] [stdout] 381 + .set(( [INFO] [stdout] 382 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 383 + success.eq(success + entry.success.into_inner()), [INFO] [stdout] 384 + failures.eq(failures + entry.failures.into_inner()), [INFO] [stdout] 385 + )), conn) [INFO] [stdout] | [INFO] [stdout] help: disambiguate the method for candidate #2 [INFO] [stdout] | [INFO] [stdout] 374 ~ let _res = diesel::RunQueryDsl::execute(diesel::update( [INFO] [stdout] 375 + task.filter( [INFO] [stdout] 376 + id.eq(task_id) [INFO] [stdout] 377 + // lock failed tasks for update [INFO] [stdout] 378 + .and(status.ne(models::StatusKind::Failure)), [INFO] [stdout] 379 + ), [INFO] [stdout] 380 + ) [INFO] [stdout] 381 + .set(( [INFO] [stdout] 382 + last_updated.eq(diesel::dsl::now), [INFO] [stdout] 383 + success.eq(success + entry.success.into_inner()), [INFO] [stdout] 384 + failures.eq(failures + entry.failures.into_inner()), [INFO] [stdout] 385 + )), conn) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0034, E0282. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0034`. [INFO] [stdout] [INFO] [stderr] error: could not compile `task-runner` (lib test) due to 25 previous errors; 2 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `task-runner` (lib) due to 25 previous errors; 2 warnings emitted [INFO] [stdout] Some errors have detailed explanations: E0034, E0282. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0034`. [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "5c31f8476413ebeeefdd4ae2ac499cce23e2ecc1a5b0c8e766d1a199b226c7c9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5c31f8476413ebeeefdd4ae2ac499cce23e2ecc1a5b0c8e766d1a199b226c7c9", kill_on_drop: false }` [INFO] [stdout] 5c31f8476413ebeeefdd4ae2ac499cce23e2ecc1a5b0c8e766d1a199b226c7c9