0bce5765b02513a167e454f112a61bd70d47d6ff,gateway/app/main/processes/controller.py,FLController,last_participation,#FLController#Any#Any#Any#,65

Before Change


        if _cycle_sequences:
            for i in range(len(_cycle_sequences)):
                if _cycle_sequences[i].contains(worker_id):
                    return i
        return 0

    def create_process(
        self,

After Change


            Return:
                last_participation: Index of the last cycle assigned to this worker.
        
        _model = self._models.first(id=model_id)
        _cycles = self._cycles.query(fl_process_id=_model.fl_process_id)

        last = 0
        if not len(_cycles):
            return last

        for cycle in _cycles:
            worker_cycle = self._worker_cycle.first(
                cycle_id=cycle.id, worker_id=worker_id
            )
            if worker_cycle and cycle.sequence > last:
                last = cycle.sequence

        return last

    def assign(self, model_id: str, version: str, worker, last_participation: int):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: OpenMined/Grid
Commit Name: 0bce5765b02513a167e454f112a61bd70d47d6ff
Time: 2020-03-02
Author: ionesiojr@gmail.com
File Name: gateway/app/main/processes/controller.py
Class Name: FLController
Method Name: last_participation


Project Name: OpenMined/Grid
Commit Name: 0bce5765b02513a167e454f112a61bd70d47d6ff
Time: 2020-03-02
Author: ionesiojr@gmail.com
File Name: gateway/app/main/processes/controller.py
Class Name: FLController
Method Name: last_participation


Project Name: sahana/eden
Commit Name: 2e268c86eee6a1753d16afe23388c9f26dd0f7ca
Time: 2020-01-27
Author: fran@aidiq.com
File Name: modules/s3db/setup.py
Class Name: S3SetupMonitorModel
Method Name: setup_monitor_task_onaccept


Project Name: sahana/eden
Commit Name: 734af1c431c93768638e306e9b08f5ef30c1c2f7
Time: 2020-03-05
Author: fran@aidiq.com
File Name: modules/s3db/asset.py
Class Name: S3AssetModel
Method Name: asset_onaccept