synergy-service/synergy/examples/timer_manager.py
Vincent Llorens ff2db3c748 fix logging
Change-Id: Ifffa10ba607e364417df75b0dfd9d9e09df2083c
2016-06-02 13:55:38 +02:00

45 lines
1.3 KiB
Python

import logging
import time
from synergy.common.manager import Manager
__author__ = "Lisa Zangrando"
__email__ = "lisa.zangrando[AT]pd.infn.it"
__copyright__ = """Copyright (c) 2015 INFN - INDIGO-DataCloud
All Rights Reserved
Licensed under the Apache License, Version 2.0;
you may not use this file except in compliance with the
License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.
See the License for the specific language governing
permissions and limitations under the License."""
LOG = logging.getLogger(__name__)
class TimerManager(Manager):
def __init__(self):
Manager.__init__(self, name="TimerManager")
def setup(self):
LOG.info("%s setup invoked!" % (self.name))
def execute(self, cmd):
LOG.info("%s execute invoked!" % (self.name))
LOG.info("command name=%s" % (cmd.getName()))
def destroy(self):
LOG.info("%s destroy invoked!" % (self.name))
def task(self):
localtime = time.asctime(time.localtime(time.time()))
LOG.info("Local current time: %s" % (localtime))