<commit_before>from apscheduler.schedulers.blocking import BlockingScheduler
from rq import Queue
from worker import conn
from run import run_gather_data, run_trader

import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

sched = BlockingScheduler()

q = Queue(connection=conn)

def gather_data():
    q.enqueue(run_gather_data)

def trader():
    q.enqueue(run_trader)

sched.add_job(trader, 'cron', day_of_week='mon-fri', hour=10, minute=30)
sched.add_job(gather_data, 'cron', day_of_week='mon-fri', hour='9-16', minute='*', second=0)


sched.start()<commit_msg>multi priority jobs<commit_after>from apscheduler.schedulers.blocking import BlockingScheduler
from rq import Queue
from worker import conn
from run import run_gather_data, run_trader

import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

sched = BlockingScheduler()

hiq = Queue('high', connection=conn)
lowq = Queue('low', connection=conn)

def gather_data():
    hiq.enqueue(run_gather_data)

def trader():
    lowq.enqueue(run_trader)

sched.add_job(trader, 'cron', day_of_week='mon-fri', hour=10, minute=0)
sched.add_job(gather_data, 'cron', day_of_week='mon-fri', hour='9-16', minute='*', second=0)


sched.start()
{'fraction_non_alphanumeric': 0.1265012009607686, 'fraction_numerical': 0.01200960768614892, 'mean_word_length': 6.9113924050632916, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7329226', 'n_tokens_mistral': 454, 'n_tokens_neox': 450, 'n_words': 95}