Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
isidzukuri committed Dec 29, 2024
1 parent 31419ee commit 57abc4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM rust:1.83 as builder
COPY . /text_analyzer
WORKDIR /text_analyzer
RUN cargo build --release

FROM rust:1.83
COPY --from=builder /text_analyzer/target/release/text_analyzer /
# CMD ["/text_analyzer"]
6 changes: 3 additions & 3 deletions src/entities_updates_consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ async fn consume_messages(
loop {
let mss = con.poll()?;
if mss.is_empty() {
// println!("No messages available right now. Sleep for now...");
println!("No messages available right now. Sleep for now...");
thread::sleep(Duration::from_millis(1000));
// println!("Sleep is over");
println!("Sleep is over");
}

for ms in mss.iter() {
Expand All @@ -44,7 +44,7 @@ async fn consume_messages(
let entity_id = parsed_entity["entity"]["id"].to_string();
let text = parsed_entity["entity"]["content"].to_string();

// println!("Process: {:?}", parsed_entity);
println!("Process: {:?}", parsed_entity);

let processor = text_processor::Processor::init().await;
processor.call(text, entity_id).await;
Expand Down

0 comments on commit 57abc4d

Please sign in to comment.