-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated search to take priority into account
Modified priojob
- Loading branch information
Vin
committed
Jan 29, 2015
1 parent
6065e16
commit f6ee3f0
Showing
2 changed files
with
6 additions
and
2 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
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,6 +1,6 @@ | ||
import manager | ||
|
||
with manager.MySQLCursor() as cur: | ||
cur.execute("UPDATE `tracks` SET `priority`=GREATEST(0, priority-1);") | ||
cur.execute("UPDATE `tracks` SET `requestcount`=IF(UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastrequested) > 3600*24*13, greatest(requestcount - 3, 0), requestcount);") | ||
#cur.execute("UPDATE `tracks` SET `priority`=GREATEST(0, priority-1);") | ||
cur.execute("UPDATE `tracks` SET `requestcount`=IF(UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastrequested) > 3600*24*13, greatest(requestcount - 1, 0), requestcount);") | ||
|