Skip to content

Commit 6bb1779

Browse files
committed
More logs
1 parent ce73ffa commit 6bb1779

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

temporalio/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _to_bridge_config(self) -> temporalio.bridge.runtime.LoggingConfig:
142142

143143

144144
LoggingConfig.default = LoggingConfig(
145-
filter=TelemetryFilter(core_level="WARN", other_level="ERROR")
145+
filter=TelemetryFilter(core_level="DEBUG", other_level="ERROR")
146146
)
147147

148148
_module_start_time = time.time()

temporalio/worker/_activity.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,18 @@ def notify_shutdown(self) -> None:
183183
async def drain_poll_queue(self) -> None:
184184
while True:
185185
try:
186+
logger.info("Poll activity tasks")
187+
186188
# Just take all tasks and say we can't handle them
187189
task = await self._bridge_worker().poll_activity_task()
188190
completion = temporalio.bridge.proto.ActivityTaskCompletion( # type: ignore[reportAttributeAccessIssue]
189191
task_token=task.task_token
190192
)
191193
completion.result.failed.failure.message = "Worker shutting down"
194+
logger.info("Complete activity task")
192195
await self._bridge_worker().complete_activity_task(completion)
193196
except temporalio.bridge.worker.PollShutdownError: # type: ignore[reportPrivateLocalImportUsage]
197+
logger.info("Return from drain")
194198
return
195199

196200
# Only call this after run()/drain_poll_queue() have returned. This will not

temporalio/worker/_worker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ async def raise_on_shutdown():
760760
# If any worker task had an exception, replace that task with a queue drain
761761
for worker, task in tasks.items():
762762
if worker and task.done() and task.exception():
763+
logger.info("Adding a drain task")
763764
tasks[worker] = asyncio.create_task(worker.drain_poll_queue())
764765

765766
logger.info("Task drain done")

0 commit comments

Comments
 (0)