This API returns the completion status of FW.

        This returns True if a FW is created with a active policy that has
        more than one rule associated with it and if a driver init is done
        successfully.
330857
def is_fw_complete(self):
        
        LOG.info("In fw_complete needed %(fw_created)s "
                 "%(active_policy_id)s %(is_fw_drvr_created)s "
                 "%(pol_present)s %(fw_type)s",
                 {'fw_created': self.fw_created,
                  'active_policy_id': self.active_pol_id,
                  'is_fw_drvr_created': self.is_fw_drvr_created(),
                  'pol_present': self.active_pol_id in self.policies,
                  'fw_type': self.fw_type})
        if self.active_pol_id is not None:
            LOG.info("In Drvr create needed %(len_policy)s %(one_rule)s",
                     {'len_policy':
                      len(self.policies[self.active_pol_id]['rule_dict']),
                      'one_rule':
                      self.one_rule_present(self.active_pol_id)})
        return self.fw_created and self.active_pol_id and (
            self.is_fw_drvr_created()) and self.fw_type and (
            self.active_pol_id in self.policies) and (
            len(self.policies[self.active_pol_id]['rule_dict'])) > 0 and (
            self.one_rule_present(self.active_pol_id))
908428
def wait_for_redfish_firmware_update_to_complete(self, redfish_object):
        
        p_state = ['Idle']
        c_state = ['Idle']

        def has_firmware_flash_completed():
            """Checks for completion status of firmware update operation

            The below table shows the conditions for which the firmware update
            will be considered as DONE (be it success or error)::

            +-----------------------------------+-----------------------------+
            |    Previous state                 |   Current state             |
            +===================================+=============================+
            |    Idle                           |   Error, Complete           |
            +-----------------------------------+-----------------------------+
            |    Updating, Verifying,           |   Complete, Error,          |
            |    Uploading, Writing             |   Unknown, Idle             |
            +-----------------------------------+-----------------------------+

            :returns: True upon firmware update completion otherwise False
            """
            curr_state, curr_percent = self.get_firmware_update_progress()
            p_state[0] = c_state[0]
            c_state[0] = curr_state
            if (((p_state[0] in ['Updating', 'Verifying',
                                 'Uploading', 'Writing'])
                    and (c_state[0] in ['Complete', 'Error',
                                        'Unknown', 'Idle']))
                    or (p_state[0] == 'Idle' and (c_state[0] in
                                                  ['Complete', 'Error']))):
                return True
            return False

        common.wait_for_operation_to_complete(
            has_firmware_flash_completed,
            delay_bw_retries=30,
            failover_msg='iLO firmware update has failed.'
        )
        common.wait_for_ilo_after_reset(redfish_object)
682600
def is_complete(self) -> bool:
        
        if not self.actual:
            return False
        for parameter in self.parameters:
            if parameter["name"] != "self" and not parameter["type"]:
                return False
        return True
834123
def _check_delete_fw(self, tenant_id, drvr_name):
        
        fw_dict = self.fwid_attr[tenant_id].get_fw_dict()
        ret = False
        try:
            with self.fwid_attr[tenant_id].mutex_lock:
                self.update_fw_db_final_result(fw_dict.get('fw_id'), (
                    fw_constants.RESULT_FW_DELETE_INIT))
                ret = self._delete_fw_fab_dev(tenant_id, drvr_name, fw_dict)
        except Exception as exc:
            LOG.error("Exception raised in delete fw %s", str(exc))
        return ret
174477
def _request_status(self):
        
        if self.item_id:
            return True

        response = self.con.get(self.monitor_url)
        if not response:
            return False

        data = response.json()

        self.status = data.get('status', 'inProgress')
        self.completion_percentage = data.get(self._cc('percentageComplete'),
                                              0)
        self.item_id = data.get(self._cc('resourceId'), None)

        return self.item_id is not None
782484
def check_for_completion
      return unless all_work_units_complete?
      set_next_status
      outs = gather_outputs_from_work_units
      return queue_for_workers([outs]) if merging?
      if complete?
        update_attributes(:outputs => outs, :time => time_taken)
        CloudCrowd.log "Job ##{id} (#{action}) #{display_status}." unless ENV['RACK_ENV'] == 'test'
        CloudCrowd.defer { fire_callback } if callback_url
      end
      self
    end
1147499
public static boolean isCompleted(String operationState) {
        return operationState == null
                || operationState.length() == 0
                || SUCCEEDED.equalsIgnoreCase(operationState)
                || isFailedOrCanceled(operationState);
    }
1370770
def check_as_b_send_completion(self):
        
        op_result = ctypes.c_int32()
        result = self.library.Par_CheckAsBSendCompletion(self.pointer,
                                                 ctypes.byref(op_result))
        return_values = {
            0: "job complete",
            1: "job in progress",
            -2: "invalid handled supplied",
        }

        if result == -2:
            raise Snap7Exception("The Client parameter was invalid")

        return return_values[result], op_result
45487
boolean success(T result) {
        State<T> oldState;
        synchronized (mutex) {
            if (state.isCompleted()) {
                return false;
            }
            oldState = state;
            state = state.getSuccessState(result);
        }
        oldState.callSuccessCallbacks(result);
        return true;

    }
366377
def _check_stage_complete(self):
        

        try:

            for task in self._tasks:
                if task.state not in [states.DONE, states.FAILED]:
                    return False

            return True

        except Exception, ex:
            raise EnTKError(ex)
751509
public boolean isComplete() {
		return _group != null && _type != null && _kind != null && _name != null && _version != null;
	}
940301
def _completion_checker(async_id, context_id):
    """"""

    if not context_id:
        logging.debug("Context for async %s does not exist", async_id)
        return

    context = FuriousContext.from_id(context_id)
    marker = FuriousCompletionMarker.get_by_id(context_id)

    if marker and marker.complete:
        logging.info("Context %s already complete" % context_id)
        return True

    task_ids = context.task_ids
    if async_id in task_ids:
        task_ids.remove(async_id)

    logging.debug("Loaded context.")
    logging.debug(task_ids)

    done, has_errors = _check_markers(task_ids)

    if not done:
        return False

    _mark_context_complete(marker, context, has_errors)

    return True
41959
def complete(self):
        
        return self.valid and (self.access_token or self.refresh_token or self.type == 2)
1157901
private boolean checkCompletion(AFTPClient client) throws ApplicationException {
	boolean isPositiveCompletion = client.isPositiveCompletion();
	if (isPositiveCompletion) return false;
	if (count++ < retrycount) return true;
	if (stoponerror) {
	    throw new lucee.runtime.exp.FTPException(action, client);
	}

	return false;
    }
7449
def finished_or_stopped(self):
        
        return (self._status.execution_mode is StateMachineExecutionStatus.STOPPED) or \
               (self._status.execution_mode is StateMachineExecutionStatus.FINISHED)
335296
def task_completed(task_id):
    

    tasks = get_tasks(task_id=task_id)
    completed_states = ('TASK_FINISHED',
                        'TASK_FAILED',
                        'TASK_KILLED',
                        'TASK_LOST',
                        'TASK_ERROR')

    for task in tasks:
        if task['state'] in completed_states:
            return True

    return False
1149817
function () {
				var filter = can.route.attr('filter');
				return this.todos.filter(function (todo) {
					if (filter === 'completed') {
						return todo.attr('complete');
					}

					if (filter === 'active') {
						return !todo.attr('complete');
					}

					return true;
				});
			}