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)
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)
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)
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)