Skip to content

schd_cleaner可以使用ioloop #1

@LiuYuguang

Description

@LiuYuguang
import asyncio

async def schd_cleaner(seconds, interval):
    while True:
        await asyncio.sleep(interval)
        # do something

if __name__ == '__main__':
    ioloop = asyncio.get_event_loop()
    ioloop.create_task(schd_cleaner(7*86400, 600))
    ioloop.run_forever()
    pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions