def main(): def workhorse(): AccountActivationReminderEmails().send_emails() while True: job_runner(workhorse) if settings.TEST: # just make sure that it runs break if not DAEMON_MODE: # just run once, don't keep looping break slog('Done sending reminder emails, sleeping...') time.sleep(TIMEOUT_1_HOUR)
""" Update the StaticAssetVersionCache value This script is invoked after a deploy, to ensure that visitors to the website won't have stale versions of CSS and JavaScript files in their browser cache """ import script_config from script_config import job_runner from script_config import slog from htk.cachekeys import StaticAssetVersionCache from htk.utils import utcnow def main(): # use date as asset_version because it is unique at the time of deploy now = utcnow() asset_version = now.strftime("%Y%m%d%H%M%S") slog("New asset version: %s" % asset_version) c = StaticAssetVersionCache() c.cache_store(asset_version) if __name__ == "__main__": job_runner(main)