Update registration state within registration_created signal

Hi,

We have multiple plugins using the registration_created signal for various tasks.

One plugin checks all registrations made on moderated registration forms and approves them if certain criteria a are met:

def handle_registration_creation(registration, management, data, **kwargs):
  if criteria_met:
    registration.update_state(approved=True)
    db.session.flush()

signals.event.registration_created.connect(handle_registration_creation)

But this created issues with other plugins using the registration_state_updated signal.
It seemed like they were using an outdated version of the registration object.

We mitigated this issue by invalidating the registration object.

def handle_registration_creation(registration, management, data, **kwargs):
  if criteria_met:
    registration.update_state(approved=True)
    db.session.flush()
    db.session.expire(registration)

signals.event.registration_created.connect(handle_registration_creation)

Is this the way intended to mitigate this issue or are we potentially creating new issues?

Further we were wondering if there is any way to determine the execution order of all functions connected to a signal?

Thank you for your insights!