Example #1
0
def create_event_from_user(sender, instance, created, **kwargs):
    if celery_is_up():
        __create_event_from_booking.delay(instance.user.email
                                          or instance.user.username)
    else:
        __create_event_from_booking(instance.user.email
                                    or instance.user.username)
Example #2
0
def init_location_by_GPS():
    if celery_is_up():
        __init_location_by_GPS.delay()
    else:
        __init_location_by_GPS()


#def update_location_by_GPS(sender, instance, created, **kwargs):
#   if celery_is_up():
#       __create_event_from_booking.delay(instance.user_email)
#   else:
#       __create_event_from_booking(instance.user_email)
Example #3
0
def remove_too_long_status(room_id):
    print("Tuan Ly: remove too long status: {}".format(room_id))
    if celery_is_up():
        __remove_too_long_status.delay(room_id)
    else:
        __remove_too_long_status(room_id)
Example #4
0
def queue_user_booking_to_event(*args):
    if celery_is_up():
        __queue_user_booking_to_event.delay(*args)
    else:
        __queue_user_booking_to_event(*args)