Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add service + timer files to update the ranking database hourly
- Loading branch information
1 parent
1edaed5
commit 9943796
Showing
2 changed files
with
24 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.include /lib/systemd/system/dcs-common.service | ||
|
||
[Unit] | ||
Description=Debian Code Search: update ranking | ||
After=postgresql.service | ||
|
||
[Service] | ||
Restart=no | ||
Type=oneshot | ||
ExecStart=/usr/bin/wget -q http://udd.debian.org/udd-popcon.sql.xz -O /tmp/popcon.sql.xz | ||
ExecStart=/bin/sh -c "echo 'DROP TABLE popcon; DROP TABLE popcon_src;' | psql udd" | ||
ExecStart=/bin/sh -c "xz -d -c /tmp/popcon.sql.xz | psql udd" | ||
ExecStart=/bin/sh -c "psql dcs < /usr/share/dcs/schema.sql" | ||
ExecStart=/usr/bin/dcs-compute-ranking \ | ||
-mirror_url=http://http.debian.net/debian |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Update ranking every hour | ||
|
||
[Timer] | ||
OnActiveSec=1min | ||
OnCalendar=hourly | ||
|
||
[Install] | ||
WantedBy=multi-user.target |