Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiocron tasks stopped to work in 2.0 #7986

Closed
3 tasks done
Flameblaxter opened this issue May 3, 2022 · 4 comments
Closed
3 tasks done

aiocron tasks stopped to work in 2.0 #7986

Flameblaxter opened this issue May 3, 2022 · 4 comments
Labels
off-topic This does not belong here.

Comments

@Flameblaxter
Copy link

Summary

aiocron tasks stopped to work in 2.0, simply not start. In the version 1.7.3 working perfetly

Reproduction Steps

Updated the 1.7.3 discord.py to 2.0 alpha..

Minimal Reproducible Code

import aiocron

import discord # Discord Library
from discord.ext import tasks, commands # Discord Commands

import asyncio

@client.event
async def on_ready():
	example_task.start()

@aiocron.crontab('*/1 * * * *')
	async def example_task():
		print(f"beep")

Expected Results

Beep in every one :) (Just for example)

Actual Results

Nothing, like the .start() even not start..

Intents

discord.Intents().all()

System Information

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

@Flameblaxter Flameblaxter added the unconfirmed bug A bug report that needs triaging label May 3, 2022
@Rapptz Rapptz added off-topic This does not belong here. and removed unconfirmed bug A bug report that needs triaging labels May 3, 2022
@Rapptz
Copy link
Owner

Rapptz commented May 3, 2022

This is the issue tracker for the discord.py library, not aiocron. So this does not belong here.

Chances are the aiocron library implicitly fetches the loop and it's different from the running loop, causing a mismatch and an error. This is not a problem if you use something like the tasks extension since it lazily fetches the running loop when it's available.

@Rapptz Rapptz closed this as completed May 3, 2022
@Flameblaxter
Copy link
Author

In 1.7.3 it working perfectly, so something made by your package :) I'm sure it will have other issue.

@Rapptz
Copy link
Owner

Rapptz commented May 3, 2022

Yes, discord.py now uses modern asyncio idioms that utilize asyncio.run. If you want more information feel free to read this gist. As it is now, consider filing an issue to the maintainers of aiocron to work well with a running event loop.

@Flameblaxter
Copy link
Author

Yes, discord.py now uses modern asyncio idioms that utilize asyncio.run. If you want more information feel free to read this gist. As it is now, consider filing an issue to the maintainers of aiocron to work well with a running event loop.

Oh make sense now, im trying to use the discord.ext tasks then.
thank you for reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
off-topic This does not belong here.
Projects
None yet
Development

No branches or pull requests

2 participants