forked from tnc-ca-geo/tnc-edge-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic formatting and remove unused imports
- Loading branch information
1 parent
f55bf0a
commit 4541487
Showing
82 changed files
with
11,029 additions
and
8,629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
|
||
from .deckhand import blueprint as deckhand | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
SECRET_KEY='not_so_secret' | ||
DEBUG=True | ||
DBUSER="edge" | ||
DBNAME="edge" | ||
THALOS_VIDEO_DIR="/thalos/videos" | ||
THALOS_CAM_NAME='cam1' | ||
VIDEO_OUTPUT_DIR='/videos' | ||
VIDEO_PASSPHRASE_FILE='/dev/null' | ||
THALOS_VIDEO_SUFFIX='.avi.done' | ||
BOAT_NAME='' | ||
DB_TABLES_VERSION='v1' | ||
SECRET_KEY = "not_so_secret" | ||
DEBUG = True | ||
DBUSER = "edge" | ||
DBNAME = "edge" | ||
THALOS_VIDEO_DIR = "/thalos/videos" | ||
THALOS_CAM_NAME = "cam1" | ||
VIDEO_OUTPUT_DIR = "/videos" | ||
VIDEO_PASSPHRASE_FILE = "/dev/null" | ||
THALOS_VIDEO_SUFFIX = ".avi.done" | ||
BOAT_NAME = "" | ||
DB_TABLES_VERSION = "v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
from flask_sqlalchemy import SQLAlchemy | ||
|
||
db = SQLAlchemy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
#!/bin/bash | ||
|
||
SCRIPTNAME="$0" | ||
SCRIPTDIR="$(dirname -- "$( readlink -f -- "$0")")" | ||
SCRIPTDIR="$(dirname -- "$(readlink -f -- "$0")")" | ||
|
||
function help { | ||
echo "usage: $SCRIPTNAME [--dbuser USER] [--dbname NAME] " | ||
exit 1 | ||
echo "usage: $SCRIPTNAME [--dbuser USER] [--dbname NAME] " | ||
exit 1 | ||
} | ||
|
||
DBNAME=edge | ||
DBUSER=edge | ||
|
||
while (( "$#" )); do | ||
while (("$#")); do | ||
case $1 in | ||
--dbuser) | ||
shift && DBUSER="$1" || help | ||
;; | ||
--dbname) | ||
shift && DBNAME="$1" || help | ||
;; | ||
*) | ||
help | ||
;; | ||
--dbuser) | ||
shift && DBUSER="$1" || help | ||
;; | ||
--dbname) | ||
shift && DBNAME="$1" || help | ||
;; | ||
*) | ||
help | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
|
||
pg_dump --clean -U "$DBUSER" "$DBNAME" > "$SCRIPTDIR/$(date -u -Iseconds | cut -f1 -d + )Z.pgdump" | ||
|
||
|
||
|
||
pg_dump --clean -U "$DBUSER" "$DBNAME" >"$SCRIPTDIR/$(date -u -Iseconds | cut -f1 -d +)Z.pgdump" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,37 @@ | ||
#!/bin/bash | ||
|
||
SCRIPTNAME="$0" | ||
SCRIPTDIR="$(dirname -- "$( readlink -f -- "$0")")" | ||
SCRIPTDIR="$(dirname -- "$(readlink -f -- "$0")")" | ||
|
||
function help { | ||
echo "usage: $SCRIPTNAME [--dbuser USER] [--dbname NAME] [DUMPFILE]" | ||
echo " DBDUMP_FILENAME defaults to the latest dumpfile, sorted by filename" | ||
exit 1 | ||
echo "usage: $SCRIPTNAME [--dbuser USER] [--dbname NAME] [DUMPFILE]" | ||
echo " DBDUMP_FILENAME defaults to the latest dumpfile, sorted by filename" | ||
exit 1 | ||
} | ||
|
||
DBNAME=edge | ||
DBUSER=edge | ||
|
||
DUMPFILE="$(ls $SCRIPTDIR/*.pgdump | sort | tail -n 1)" | ||
|
||
while (( "$#" )); do | ||
while (("$#")); do | ||
case $1 in | ||
--dbuser) | ||
shift && DBUSER="$1" || help | ||
;; | ||
--dbname) | ||
shift && DBNAME="$1" || help | ||
;; | ||
*) | ||
if [ -e "$1" ] ; then | ||
DUMPFILE="$1" | ||
else | ||
echo "file does not exist" | ||
exit 1 | ||
fi | ||
;; | ||
--dbuser) | ||
shift && DBUSER="$1" || help | ||
;; | ||
--dbname) | ||
shift && DBNAME="$1" || help | ||
;; | ||
*) | ||
if [ -e "$1" ]; then | ||
DUMPFILE="$1" | ||
else | ||
echo "file does not exist" | ||
exit 1 | ||
fi | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
|
||
psql -U "$DBUSER" "$DBNAME" < $DUMPFILE | ||
|
||
|
||
|
||
psql -U "$DBUSER" "$DBNAME" <$DUMPFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.