# Path: moedjpack/moepad/mpcelery.py
# CELERYBEAT_SCHEDULE = {
#     'send-every-20-mins-in-day': {
#         'task': 'moedjpack.moepad.mptask.send',
#         'schedule': crontab(hour='0-15,22-0', minute='10,30,50'),
#         'args': None,
#     },
#     'send-once-an-hour-in-night': {
#         'task': 'moedjpack.moepad.mptask.send',
#         'schedule': crontab(hour='16-22', minute='10'),
#         'args': None,
#     },
#     'update-every-20-mins': {
#         'task': 'moedjpack.moepad.mptask.updateitem',
#         'schedule': crontab(minute='*'),
#         'args': None,
#     },
#     # 'test': {
#     #     'task': 'moedjpack.moepad.mptask.justtest',
#     #     'schedule': crontab(hour='0-15,22-0', minute='*'),
#     #     'args': None,
#     # },
#     # 'nighttest': {
#     #     'task': 'moedjpack.moepad.mptask.nighttest',
#     #     'schedule': crontab(hour='16-22', minute='*/2'),
#     #     'args': None,
#     # },
# }
# CELERY_TIMEZONE = 'UTC'


from moedjpack.moepad.mpcelery import app
from mputils import logger
from update import UpdateItems, SendItem


@app.task
def send():
    sender = SendItem()
    sender.sendRoutine()


@app.task
def updateitem():
    update = UpdateItems(20)
    update.updateRoutine()


@app.task
def justtest():
    logger.info("justtest")



# Path: moedjpack/moepad/mpcelery.py
# CELERYBEAT_SCHEDULE = {
#     'send-every-20-mins-in-day': {
#         'task': 'moedjpack.moepad.mptask.send',
#         'schedule': crontab(hour='0-15,22-0', minute='10,30,50'),
#         'args': None,
#     },
#     'send-once-an-hour-in-night': {
#         'task': 'moedjpack.moepad.mptask.send',
#         'schedule': crontab(hour='16-22', minute='10'),
#         'args': None,
#     },
#     'update-every-20-mins': {
#         'task': 'moedjpack.moepad.mptask.updateitem',
#         'schedule': crontab(minute='*'),
#         'args': None,
#     },
#     # 'test': {
#     #     'task': 'moedjpack.moepad.mptask.justtest',
#     #     'schedule': crontab(hour='0-15,22-0', minute='*'),
#     #     'args': None,
#     # },
#     # 'nighttest': {
#     #     'task': 'moedjpack.moepad.mptask.nighttest',
#     #     'schedule': crontab(hour='16-22', minute='*/2'),
#     #     'args': None,
#     # },
# }
# CELERY_TIMEZONE = 'UTC'


# Path: moedjpack/moepad/mptask.py
from moedjpack.moepad.mpcelery import app
from mputils import logger
from update import UpdateItems, SendItem



@app.task
def send():
    sender = SendItem()
    sender.sendRoutine()


@app.task
def updateitem():
    update = UpdateItems(20)
    update.updateRoutine()


@app.task
def justtest():
    logger.info("justtest")



@app.task