Skip to content

Commit ecea7f2

Browse files
committed
Minor fixes
1 parent 13e0651 commit ecea7f2

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

offwork/__main__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,13 @@ def _detect_offwork_extras(script: str) -> list[str]:
318318
def _collect_extras(args: argparse.Namespace, script: Path) -> list[str]:
319319
"""Gather offwork extras and third-party packages for a script."""
320320
extras: list[str] = list(args.extra or [])
321-
backend = os.environ.get("OFFWORK_BACKEND", "")
321+
backend = os.environ.get("OFFWORK_BACKEND", os.environ.get("BROKER_URL", "")) or ""
322322
if backend.startswith(("redis://", "rediss://")) and "redis" not in extras:
323323
extras.append("redis")
324324
if backend.startswith(("amqp://", "amqps://")) and "rabbitmq" not in extras:
325325
extras.append("rabbitmq")
326+
if backend.startswith(("ws://", "wss://")) and "ws" not in extras:
327+
extras.append("ws")
326328
for extra in _detect_offwork_extras(str(script)):
327329
if extra not in extras:
328330
extras.append(extra)

offwork/worker/remote.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,11 @@ async def _execute_task(
634634
)
635635
return
636636

637+
logger.info(
638+
"\u25b6 %-40s %s starting",
639+
task.function_name, task.task_id[:8],
640+
)
641+
637642
# Set up rate-limited progress callback
638643
loop = asyncio.get_running_loop()
639644
progress_cb, flush = _make_progress_callback(backend, task.task_id, loop)

0 commit comments

Comments
 (0)