Skip to content

Commit

Permalink
once a week cron job set up
Browse files Browse the repository at this point in the history
  • Loading branch information
meuse committed Jun 23, 2013
1 parent 92623df commit d720e81
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
Binary file added cronscripts/.onceaweek.py.swp
Binary file not shown.
Empty file added cronscripts/meuse2
Empty file.
30 changes: 30 additions & 0 deletions cronscripts/onceaweek.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
This cron script is automatically run once a week
following activities are done:
------------------------------
* checks for artist tags
* decays the a2s property by 0.95
* updates the artist popularity
* checks artist similarity
"""

import sys
sys.path.insert(0, '/Users/meuse/Meuse/env/meuse/meuse/meuse')
from downloader import Downloader

downloader = Downloader()

#get taags
downloader.download_tags()

#decay artist popularity
downloader.decay_a2s()

#get popularity
downloader.update_artist_popularity()

#get similar artists
downloader.download_similar_artists()


Binary file modified database_wrapper.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def decay_a2s(self):
dbwr = database_wrapper.DatabaseWrapper()

print ("Decaying a2s now")
dbwr.decay_a2s()
dbwr.decayA2S()
print ("Done!")

def download_stations(self):
Expand Down
Binary file modified downloader.pyc
Binary file not shown.

0 comments on commit d720e81

Please sign in to comment.