from apscheduler.schedulers.blocking import BlockingScheduler
from helpers.dbms import post_to_slack, clear_denied
import os
from pymongo import MongoClient

host = os.environ.get('MONGODB_URI', 'mongodb://localhost:27017/slack-confessions')
client = MongoClient(host=f'{host}?retryWrites=false')
db = client.get_default_database()

users = db.users
confessions = db.confessions

# scheduler instantiation
sched = BlockingScheduler()

@sched.scheduled_job('cron', hour='*', minute=10)
def scheduled_daily():
    post_to_slack(confessions)

@sched.scheduled_job('cron',day='*/3',hour=0, minute=50)
def scheduled_bi_weekly():
    clear_denied(confessions)


sched.start()

015e6d755a89c6386c2b24f9a010d44792f43ace
<mask token>


@sched.scheduled_job('cron', hour='*', minute=10)
def scheduled_daily():
    post_to_slack(confessions)


@sched.scheduled_job('cron', day='*/3', hour=0, minute=50)
def scheduled_bi_weekly():
    clear_denied(confessions)


<mask token>

<mask token>


@sched.scheduled_job('cron', hour='*', minute=10)
def scheduled_daily():
    post_to_slack(confessions)


@sched.scheduled_job('cron', day='*/3', hour=0, minute=50)
def scheduled_bi_weekly():
    clear_denied(confessions)


sched.start()

<mask token>
host = os.environ.get('MONGODB_URI',
    'mongodb://localhost:27017/slack-confessions')
client = MongoClient(host=f'{host}?retryWrites=false')
db = client.get_default_database()
users = db.users
confessions = db.confessions
sched = BlockingScheduler()


@sched.scheduled_job('cron', hour='*', minute=10)
def scheduled_daily():
    post_to_slack(confessions)


@sched.scheduled_job('cron', day='*/3', hour=0, minute=50)
def scheduled_bi_weekly():
    clear_denied(confessions)


sched.start()

from apscheduler.schedulers.blocking import BlockingScheduler
from helpers.dbms import post_to_slack, clear_denied
import os
from pymongo import MongoClient
host = os.environ.get('MONGODB_URI',
    'mongodb://localhost:27017/slack-confessions')
client = MongoClient(host=f'{host}?retryWrites=false')
db = client.get_default_database()
users = db.users
confessions = db.confessions
sched = BlockingScheduler()


@sched.scheduled_job('cron', hour='*', minute=10)
def scheduled_daily():
    post_to_slack(confessions)


@sched.scheduled_job('cron', day='*/3', hour=0, minute=50)
def scheduled_bi_weekly():
    clear_denied(confessions)


sched.start()

from apscheduler.schedulers.blocking import BlockingScheduler
from helpers.dbms import post_to_slack, clear_denied
import os
from pymongo import MongoClient

host = os.environ.get('MONGODB_URI', 'mongodb://localhost:27017/slack-confessions')
client = MongoClient(host=f'{host}?retryWrites=false')
db = client.get_default_database()

users = db.users
confessions = db.confessions

# scheduler instantiation
sched = BlockingScheduler()

@sched.scheduled_job('cron', hour='*', minute=10)
def scheduled_daily():
    post_to_slack(confessions)

@sched.scheduled_job('cron',day='*/3',hour=0, minute=50)
def scheduled_bi_weekly():
    clear_denied(confessions)


sched.start()
