Exemplo n.º 1
0
def init(url):
  timestamp = str(time()).replace('.', '')[-3:]
  
  store.init(timestamp)
  swap.init(timestamp)

  db.metadata().create_all(db.engine())
  
  swap.current.push(url)
Exemplo n.º 2
0
def init(timestamp = None):
  global nodes, edges

  if nodes == None : nodes = 'nodes_' + timestamp
  if edges == None : edges = 'edges_' + timestamp

  nodes = Nodes(db.metadata(), db.conn(), nodes)
  edges = Edges(db.metadata(), db.conn(), edges)

  nodes.edges = edges
Exemplo n.º 3
0
def init(timestamp=None):
    global current, next

    if not current:
        current = "swap_current_" + timestamp
    if not next:
        next = "swap_next_" + timestamp

    current = Stack(db.metadata(), db.conn(), current)
    next = Stack(db.metadata(), db.conn(), next)