Method
update
(&self, executor: Arc<RwLock<Executor>>)
Source from the content-addressed store, hash-verified
| 91 | }) |
| 92 | } |
| 93 | pub async fn update(&self, executor: Arc<RwLock<Executor>>) -> ApplicationResult<()> { |
| 94 | sqlx::query_as!( |
| 95 | Self, |
| 96 | r#" |
| 97 | UPDATE service_outbox SET |
| 98 | processed =$1 |
| 99 | WHERE id = $2 |
| 100 | "#, |
| 101 | true, |
| 102 | self.id, |
| 103 | ) |
| 104 | .execute(executor.write().await.transaction()) |
| 105 | .await |
| 106 | .map_err(|err| { |
| 107 | eprintln!("{}", err); |
| 108 | ApplicationError::DatabaseConnectionError(Box::new(err)) |
| 109 | })?; |
| 110 | Ok(()) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | impl Command for Outbox {} |