Closed unflxw closed 3 months ago
This is a message from the daily scheduled checks.
This is a message from the daily scheduled checks.
This is a message from the daily scheduled checks.
This is a message from the daily scheduled checks.
This is a message from the daily scheduled checks.
This is a message from the daily scheduled checks.
See also https://github.com/appsignal/appsignal-nodejs/pull/1079.
In Ruby and Node.js, we use
const_missing
andProxy
respectively to makeHeartbeat
pretend to beCron
, allowing the result of instantiating one to pass an instance class check for the other and vice-versa, while also emitting a deprecation warning in the process.Since the above is not possible in Python, we instead make a
Heartbeat
class that emits the deprecation warning, returns instances ofCron
when initialised, and also pretends to beCron
when instance-checked against. It's not perfect (neither isProxy
) but it does the trick.