Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
jobmanager
Commits
12cc6fff
Commit
12cc6fff
authored
Apr 15, 2017
by
Andreas Valder
Browse files
added config options
parent
64e29a3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
config.ini.example
0 → 100644
View file @
12cc6fff
[MAIN]
VIDEOS_RAW=/mnt/raw
VIDEOS_RELEASED=/mnt/released
[API]
KEY=
BASE=http://localhost:5000
[JOBS]
TYPES=thumbnail
[thumbnail]
width=640
height=-1
folder=thumbnail
worker.py
View file @
12cc6fff
...
...
@@ -21,8 +21,8 @@ data = json.loads(sys.argv[4])
print
(
sys
.
argv
)
if
(
jobtype
==
'thumbnail'
):
inputfile
=
'/mnt/sshfs/video-main
/'
+
data
[
'path'
]
outputfile
=
'/tmp/
l_'
+
str
(
data
[
'lectureid'
])
+
'.p
n
g'
inputfile
=
config
[
'MAIN'
][
'VIDEOS_RELEASED'
]
+
'
/'
+
data
[
'path'
]
outputfile
=
config
[
'MAIN'
][
'VIDEOS_RELEASED'
]
+
'/'
+
config
[
'thumbnail'
][
'folder'
]
+
'/'
+
'
l_'
+
str
(
data
[
'lectureid'
])
+
'.
j
pg'
api
.
job_ping
(
id
=
id
)
duration
=
float
(
subprocess
.
run
([
"ffprobe"
,
"-v"
,
"error"
,
"-show_entries"
,
"format=duration"
,
"-of"
,
"default=noprint_wrappers=1:nokey=1"
,
inputfile
],
stdout
=
subprocess
.
PIPE
).
stdout
)
api
.
job_ping
(
id
=
id
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment