I'm using the following lib for creating ftp server called pyftpdlib.
Following the exact example of building a base ftp server apart of the fact that I've created my own custom handler and passing it as in the example.
First question: I need to be able to poll every 50 seconds on a static dictionary (class variable) defined in the custom handler. After each interval of 50 seconds I need to check for some condition and act accordingly.
As you probably see ,the custom handler is being used by the FTP server, I guess I need some working thread that will be able poll on the custom handler's static dictionary every 50 seconds, how do I launch another thread that will be bound to the custom handler and do that kind of timer polling?
Second question: Is there some way to know that a time of 50 seconds has been passed (on the second it passed) since a specific timestamp which was read from the static dict - I mean to do that without polling every X seconds to check if time has passed, which can be inaccurate.