Skip to content

Reconsider Actor.main for v2 #237

Description

@janbuchar

It could take care of asyncio.run for example, or it could be a decorator. There isn't much value in it now, compared to async with Actor.

A few mockups:

from apify import Actor

@Actor.main
async def main():
  Actor.push_data({})
from apify import Actor

async def main():
  Actor.push_data({})

Actor.run(main())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions