#Run Mutation based on successful jobs

1 messages · Page 1 of 1 (latest)

tight mirage
#

We have an import flow for our Airbnb App that imports multiple pieces of data, namely:

  • Listings
  • Reservations for each listing
  • Conversations for each reservation
  • Messages for each conversation

When a user imports a listing, we run action to fetch listings, reservations, conversations, and messages.

After fetching listings and reservations (not using the scheduler), we use the reservationIds to schedule actions to fetch conversations and messages. We update the user's subscription details after the function calls to schedule these actions. So if these scheduled actions fail, we still update the subscription anyways.

How should we go about updating the subscription only after the actions are successful and not when they fail?

tight mirage
#

The sub-jobs have a specific top-level listingId attached to the job description, so we know it belongs to which listing