Skip to content

Commit

Permalink
Merge pull request #95 from gregwym/greg/shutdown-log
Browse files Browse the repository at this point in the history
Log shutdown progress for activity and workflow pollers
  • Loading branch information
cj-cb authored Feb 19, 2025
2 parents 93c17bf + 1544f2d commit e7dbe2e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.28
- Log shutdown progress for activity and workflow pollers
- Add WorkflowAlreadyCompletingError to the rbi file
- Validate that a workflow isn't completed before recording commands
- Ruby 3 compatibility

## 0.1.21
- Add workflow id and activity id to workflow and activity logs

Expand Down
2 changes: 2 additions & 0 deletions lib/cadence/activity/poller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def stop

def wait
thread.join
Cadence.logger.info('Draining activity worker job queue')
thread_pool.shutdown
Cadence.logger.info('Activity poller shutdown gracefully')
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/cadence/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Cadence
VERSION = '0.1.21'.freeze
VERSION = '0.1.28'.freeze
end
4 changes: 3 additions & 1 deletion lib/cadence/workflow/poller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ def start

def stop
@shutting_down = true
Cadence.logger.info('Shutting down a workflow poller')
Cadence.logger.info('Shutting down workflow poller')
end

def wait
@thread.join
Cadence.logger.info('Draining workflow worker job queue')
thread_pool.shutdown
Cadence.logger.info('Workflow poller shutdown gracefully')
end

private
Expand Down

0 comments on commit e7dbe2e

Please sign in to comment.