Skip to content

Fix compatibility with Sanic 21.12.0+#42

Open
jmarcet wants to merge 1 commit intodkruchinin:masterfrom
jmarcet:master
Open

Fix compatibility with Sanic 21.12.0+#42
jmarcet wants to merge 1 commit intodkruchinin:masterfrom
jmarcet:master

Conversation

@jmarcet
Copy link

@jmarcet jmarcet commented Jan 5, 2022

The deprecation is now an error with current Sanic 21.12.0

Would you mind to include the fix?

@jmarcet jmarcet force-pushed the master branch 2 times, most recently from 00dfae4 to 438440e Compare January 5, 2022 13:08
Copy link

@sorenrife sorenrife left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anna-hope
Copy link

Is there any timeline for merging this?

@anttilip
Copy link

anttilip commented Feb 8, 2022

In __init__.py lines 134 and 144 app.memcollect_task should be changed to app.ctx.memcollect_task as these are still causing errors.

@app.listener('before_server_start')
async def start_memcollect_task(app, loop):
app.memcollect_task = loop.create_task(
metrics.periodic_memcollect_task(
app,
mmc_period_sec,
loop
)
)
@app.listener('after_server_stop')
async def stop_memcollect_task(app, loop):
app.memcollect_task.cancel()

@ghost
Copy link

ghost commented Jun 2, 2022

Are you still working on this? @jmarcet

Signed-off-by: Javier Marcet <javier@marcet.info>
@jmarcet
Copy link
Author

jmarcet commented Jul 15, 2023

@ghost I had forgotten completely about this PR. I've been using it all this time without that change 😅

@jmarcet jmarcet requested a review from sorenrife July 17, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants