You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/02 09:00:50 UTC

[GitHub] [apisix] kevinw66 edited a comment on issue #6786: help request: is there any way to trigger a timer when a plugin is enabled and cancel timer when plugin is disabled?

kevinw66 edited a comment on issue #6786:
URL: https://github.com/apache/apisix/issues/6786#issuecomment-1086595572


   > you can use `local timers = require("apisix.timers")`, see:
   > 
   > https://github.com/apache/apisix/blob/97bcb565075e59372842973844216c129af5d812/apisix/plugins/log-rotate.lua#L301-L308
   
   I have check into this code, but this cannot fit my needs.
   
   1、the interval cannot set by user, It's always 1 seconds If I remember it correctly.
   2、there is no such phase like `plugin_enable` and `plugin_disable`,the `init` phase will trigger whatever my plugin is enabled or not


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org