pull/1/head
Konstantin Gründger 2015-11-15 12:10:20 +01:00
rodzic 619a6ece82
commit 120d5daf6b
10 zmienionych plików z 7 dodań i 10 usunięć

Wyświetl plik

@ -1 +0,0 @@

Wyświetl plik

@ -19,4 +19,4 @@ def updateddb():
print("Updating ddb data...") print("Updating ddb data...")
result = update_ddb_data.delay() result = update_ddb_data.delay()
counter = result.get() counter = result.get()
print("Imported %i devieces."%counter) print("Imported %i devices." % counter)

Wyświetl plik

@ -16,7 +16,7 @@ manager = Manager()
@manager.command @manager.command
def list(): def list_all():
"""Show a list of all receivers.""" """Show a list of all receivers."""
sq = session.query(distinct(ReceiverBeacon.name).label('name'), func.max(ReceiverBeacon.timestamp).label('lastseen'), func.count(ReceiverBeacon.name).label('messages_count')).\ sq = session.query(distinct(ReceiverBeacon.name).label('name'), func.max(ReceiverBeacon.timestamp).label('lastseen'), func.count(ReceiverBeacon.name).label('messages_count')).\
filter(ReceiverBeacon.timestamp > back_24h).\ filter(ReceiverBeacon.timestamp > back_24h).\

Wyświetl plik

@ -11,6 +11,7 @@ from ogn.model import Base
MODULE_VERSION = "0.1" MODULE_VERSION = "0.1"
class ognGateway: class ognGateway:
def __init__(self): def __init__(self):
pass pass
@ -30,7 +31,6 @@ class ognGateway:
self.sock.send(login.encode()) self.sock.send(login.encode())
self.sock_file = self.sock.makefile('rw') self.sock_file = self.sock.makefile('rw')
def run(self): def run(self):
keepalive_time = time() keepalive_time = time()
while True: while True:

Wyświetl plik

@ -5,6 +5,7 @@ DB_URI = 'sqlite:///beacons.db'
from manager import Manager from manager import Manager
manager = Manager() manager = Manager()
@manager.command @manager.command
def run(aprs_user="anon-dev"): def run(aprs_user="anon-dev"):
"""Run the aprs client.""" """Run the aprs client."""

Wyświetl plik

@ -1 +0,0 @@

Wyświetl plik

@ -1 +0,0 @@

Wyświetl plik

@ -1,8 +1,7 @@
import unittest import unittest
from ogn.aprs_utils import ms2fpm from ogn.aprs_utils import ms2fpm
from ogn.model.beacon import Beacon from ogn.model import Beacon, AircraftBeacon
from ogn.model.aircraft_beacon import AircraftBeacon
class TestStringMethods(unittest.TestCase): class TestStringMethods(unittest.TestCase):

Wyświetl plik

@ -1,7 +1,7 @@
import unittest import unittest
from ogn.aprs_utils import dmsToDeg, kts2kmh, m2feet from ogn.aprs_utils import dmsToDeg, kts2kmh, m2feet
from ogn.model.beacon import Beacon from ogn.model import Beacon
class TestStringMethods(unittest.TestCase): class TestStringMethods(unittest.TestCase):

Wyświetl plik

@ -1,6 +1,6 @@
import unittest import unittest
from ogn.model.receiver_beacon import ReceiverBeacon from ogn.model import ReceiverBeacon
class TestStringMethods(unittest.TestCase): class TestStringMethods(unittest.TestCase):