Show job URLs on dashboard

master
Ivan Kozik 2015-07-18 04:14:50 +00:00
parent 933d293305
commit e804f7171e
3 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,7 @@ done
echo
echo "$id" > "$dir/id"
echo "$url" > "$dir/start_url"
echo "global,$igsets" > "$dir/igsets"
touch "$dir/ignores"

View File

@ -38,6 +38,7 @@ class MyServerProtocol(WebSocketServerProtocol):
"job_data": {
"ident": obj["ident"],
"started_at": 0,
"url": obj["start_url"]
},
"url": obj["url"],
"response_code": obj["response_code"],

View File

@ -23,6 +23,7 @@ class MyClientProtocol(WebSocketClientProtocol):
self.sendMessage(json.dumps({
"ident": grabId,
"type": "download",
"start_url": start_url,
"url": url,
"response_code": response_code,
"response_message": response_message,
@ -87,6 +88,7 @@ class FileChangedWatcher(object):
grabId = open(os.path.join(workingDir, "id")).read().strip()
start_url = open(os.path.join(workingDir, "start_url")).read().strip()
igsetsWatcher = FileChangedWatcher(os.path.join(workingDir, "igsets"))
ignoresWatcher = FileChangedWatcher(os.path.join(workingDir, "ignores"))