Skip to content

Commit

Permalink
fix: publish to nats instead of jetstream
Browse files Browse the repository at this point in the history
  • Loading branch information
lennartkloock committed Jan 12, 2024
1 parent 7b58d0c commit 4f95efe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platform/image_processor/src/processor/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub enum ProcessorError {
S3Upload(s3::error::S3Error),

#[error("publish to nats: {0}")]
NatsPublish(#[from] async_nats::jetstream::context::PublishError),
NatsPublish(#[from] async_nats::PublishError),

#[error("image: {0}")]
FileFormat(std::io::Error),
Expand Down
4 changes: 2 additions & 2 deletions platform/image_processor/src/processor/job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<'a, G: ImageProcessorGlobal> Job<'a, G> {
tracing::warn!(err = %e, "job failed");
tracing::debug!("publishing job failure event to {}", self.job.task.callback_subject);
self.global
.jetstream()
.nats()
.publish(
self.job.task.callback_subject.clone(),
pb::scuffle::platform::internal::events::ProcessedImage {
Expand Down Expand Up @@ -167,7 +167,7 @@ impl<'a, G: ImageProcessorGlobal> Job<'a, G> {
// job completion
tracing::debug!("publishing job completion event to {}", self.job.task.callback_subject);
self.global
.jetstream()
.nats()
.publish(
self.job.task.callback_subject.clone(),
pb::scuffle::platform::internal::events::ProcessedImage {
Expand Down
2 changes: 1 addition & 1 deletion video/api/src/api/events/ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl ApiRequest<EventsAckResponse> for tonic::Request<EventsAckRequest> {
None => return Err(tonic::Status::invalid_argument("missing action")),
};

global.jetstream().publish(reply, ack_kind.into()).await.map_err(|err| {
global.nats().publish(reply, ack_kind.into()).await.map_err(|err| {
tracing::error!(err = %err, "failed to publish ack");
tonic::Status::internal("failed to publish ack")
})?;
Expand Down

0 comments on commit 4f95efe

Please sign in to comment.