Exemple #1
0
def create_event(task, new_datetime):
    e = SchEventDB.create_or_update(task, new_datetime, "planned")
    if e:
        logging.warning("Planned %s at %s" % (e, new_datetime + DELTA_LOCAL_UTC))
        sched.add_date_job(emit_event, new_datetime + DELTA_LOCAL_UTC, [e])
    else:
        logging.error("Exists %s at %s:%s" % (task["_id"], task["time_h"], task["time_m"]))
Exemple #2
0
def create_event(task, new_datetime):
    e = SchEventDB.create_or_update(task, new_datetime, 'planned')
    if e:
        logging.warning("Planned %s at %s" %
                        (e, new_datetime + DELTA_LOCAL_UTC))
        sched.add_date_job(emit_event, new_datetime + DELTA_LOCAL_UTC, [e])
    else:
        logging.error("Exists %s at %s:%s" %
                      (task['_id'], task['time_h'], task['time_m']))