fix queue

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3512 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2017-01-10 22:56:51 +00:00
parent 92a5c27401
commit efd7544b8c
4 changed files with 11 additions and 9 deletions

View File

@ -1,7 +1,7 @@
Package: webif Package: webif
Priority: optional Priority: optional
Section: web Section: web
Version: 1.3.5-3 Version: 1.3.5-4
Architecture: mipsel Architecture: mipsel
Maintainer: af123@hpkg.tv Maintainer: af123@hpkg.tv
Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1) Depends: tcpfix,webif-channelicons(>=1.1.24),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1)

View File

@ -24,9 +24,9 @@ foreach q [queue all] {
} [$q get file]] } [$q get file]]
set submitted [clock format [$q get submitted] \ set submitted [clock format [$q get submitted] \
-format {%d/%m/%Y %H:%M:%S}] -format {%d/%m/%Y %H:%M:%S}]
if {[$q get last] ne "0"} { set last [$q get last]
set last [clock format [$q get last] \ if {$last ne "" && $last ne "0"} {
-format {%d/%m/%Y %H:%M:%S}] set last [clock format $last -format {%d/%m/%Y %H:%M:%S}]
} else { } else {
set last "" set last ""
} }

View File

@ -4,7 +4,6 @@ source /mod/webif/lib/setup
require queue.class system.class require queue.class system.class
proc fixflags {dir} { proc fixflags {dir} {
puts "Upgrading directory flags..."
foreach entry [readdir -nocomplain $dir] { foreach entry [readdir -nocomplain $dir] {
if {[file isdirectory "$dir/$entry"]} { if {[file isdirectory "$dir/$entry"]} {
fixflags "$dir/$entry" fixflags "$dir/$entry"
@ -19,7 +18,7 @@ proc fixflags {dir} {
} }
set queries { set queries {
2 { {alter table queue add column last integer} } 2 { {alter table queue add column last integer default 0} }
} }
set latest 3 set latest 3
@ -30,7 +29,10 @@ if {$cur == $latest} {
exit exit
} }
if {$cur < 3} { fixflags [system mediaroot] } if {$cur < 3} {
puts "Upgrading directory flags..."
fixflags [system mediaroot]
}
if {$cur < 2} { if {$cur < 2} {
puts "Clearing queue due to version change..." puts "Clearing queue due to version change..."

View File

@ -53,8 +53,8 @@ proc {queue dbhandle} {args} {
runtime integer, runtime integer,
retries integer default 0, retries integer default 0,
interrupts integer default 0, interrupts integer default 0,
submitted integer, submitted integer default 0,
last integer last integer default 0
); );
} }
$::queue::db query { $::queue::db query {