@classmethod
    @provide_session
    def set(
            cls,
            key,
            value,
            execution_date,
            task_id,
            dag_id,
            session=None):
        session.expunge_all()

        # remove any duplicate XComs
        session.query(cls).filter(
            cls.key == key,
            cls.execution_date == execution_date,
            cls.task_id == task_id,
            cls.dag_id == dag_id).delete()

        # insert new XCom
        session.add(XCom(
            key=key,
            value=value,
            execution_date=execution_date,
            task_id=task_id,
            dag_id=dag_id))

        session.commit()
Compare performance stats output by the 'build_apps' command.
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/XCom.set--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/app_builder_live_test/compare_perf_stats.py/compare_stats