Skip to content

Commit

Permalink
Fix (ignore) typing errors in the new example
Browse files Browse the repository at this point in the history
  • Loading branch information
azawlocki committed Apr 30, 2021
1 parent 4eb53ba commit ed99add
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions examples/interactive-requestor.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python3
"""A requestor script used for testing agreement termination."""
import asyncio
import colors
import colors # type: ignore
from datetime import timedelta
import logging

import aioconsole
import aioconsole # type: ignore

from yapapi import Executor, Task, WorkContext
from yapapi.log import enable_default_logger, log_summary, log_event_repr # noqa
Expand All @@ -22,10 +21,8 @@ async def main():

async def worker(ctx: WorkContext, tasks):

# yield ctx.commit()
async for task in tasks:
if task.data is None:
print(colors.magenta("Task data is None"))
continue
print(colors.magenta(f"Got new task: {task.data}"))
ctx.run("/bin/echo", task.data)
Expand Down
1 change: 0 additions & 1 deletion yapapi/executor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,6 @@ async def start_worker(agreement: rest.market.Agreement, node_info: NodeInfo) ->
if isinstance(evt, events.CommandExecuted) and not evt.success:
raise CommandExecutionError(evt.command, evt.message)


emit(events.GettingResults(agr_id=agreement.id, task_id=task_id))
await batch.post()
emit(events.ScriptFinished(agr_id=agreement.id, task_id=task_id))
Expand Down

0 comments on commit ed99add

Please sign in to comment.