refactoring for pull/processing abstraction

This commit is contained in:
Xevion
2019-10-27 14:24:28 -05:00
parent dc14adeca2
commit 92b109241e
4 changed files with 25 additions and 13 deletions

12
main.py Normal file
View File

@@ -0,0 +1,12 @@
import os
import sys
import time
import json
import auth
import pull
import process
import logging
cache = json.load(open(os.path.join(sys.path[0], f'.cache-{auth.username}')))
if time.time() > cache['expires_at']:
pull.main()