from .constants import *
-class Pakfire(object):
+class Backend(object):
def __init__(self, config_file="pbs.conf"):
# Read configuration file.
self.config = self.read_config(config_file)
import time
import traceback
-from . import Pakfire
+from . import Backend
class Event(object):
interval = None
@staticmethod
def fork(method, *args, **kwargs):
# Create new pakfire instance.
- _pakfire = Pakfire()
+ backend = Backend()
- return method(_pakfire, *args, **kwargs)
+ return method(backend, *args, **kwargs)
class Scheduler(object):
import tornado.options
import tornado.web
-from .. import Pakfire
+from .. import Backend
from . import handlers
if self.__pakfire is None:
config_file = os.path.join(BASEDIR, "..", "pbs.conf")
- self.__pakfire = Pakfire(config_file=config_file)
+ self.__pakfire = Backend(config_file=config_file)
return self.__pakfire
import tornado.options
import tornado.web
+from .. import Backend
+
from . import handlers_api
from .handlers import *
if self.__pakfire is None:
config_file = os.path.join(BASEDIR, "..", "pbs.conf")
- self.__pakfire = backend.Pakfire(config_file=config_file)
+ self.__pakfire = Backend(config_file=config_file)
return self.__pakfire