Regular status shows customer's hours, expected time until response
196828
public MessageCenterStatus getRegularStatus() {
		InteractionConfiguration configuration = getConfiguration();
		if (configuration == null) {
			return null;
		}
		JSONObject status = configuration.optJSONObject(KEY_STATUS);
		if (status == null) {
			return null;
		}
		String statusBody = status.optString(KEY_STATUS_BODY);
		if (statusBody == null || statusBody.isEmpty()) {
			return null;
		}
		return new MessageCenterStatus(statusBody, null);
	}
1010425
def on_status(self, status):
        """"""
        self.out.write(json.dumps(status))
        self.out.write(os.linesep)

        self.received += 1
        return not self.terminate
856952
function _getResponseStatus(handler, req, callback) {
        // Number
        if (!_(handler.reply.status).isFunction()) {
            return callback(handler.reply.status || 0);
        }

        // Synch function
        return callback(handler.reply.status(req) || 0);
    }
1099755
def status():
    '''
    
    '''
    ret = {}
    apcaccess = _check_apcaccess()
    res = __salt__['cmd.run_all'](apcaccess)
    retcode = res['retcode']
    if retcode != 0:
        ret['Error'] = 'Something with wrong executing apcaccess, is apcupsd running?'
        return ret

    for line in res['stdout'].splitlines():
        line = line.split(':')
        ret[line[0].strip()] = line[1].strip()

    return ret
341418
def _check_reply_pending(self, option):
        """"""
        if not self.telnet_opt_dict.has_key(option):
            self.telnet_opt_dict[option] = TelnetOption()
        return self.telnet_opt_dict[option].reply_pending
790248
def check_status(self, job_id):
        """"""
        response, http_response = self._client.jobs.get_job(job_id=job_id).\
            result()
        if http_response.status_code == 404:
            raise HTTPNotFound('The given job ID was not found. Error: {}'.
                               format(http_response.data))
        return response
1283274
function statusText()
    {
        if ( $this->Progress == 100 )
        {
            return self::STATUS_COMPLETE;
        }

        if ( $this->Progress < 0 )
        {
            return self::STATUS_NOT_STARTED;
        }

        $timeSinceLastReport = time() - $this->LastReportTimestamp;

        if ( $timeSinceLastReport <= self::STATUS_ACTIVE_TIMEOUT )
        {
            return self::STATUS_ACTIVE;
        }

        if ( $timeSinceLastReport <= self::STATUS_DELAYED_TIMEOUT )
        {
            return self::STATUS_DELAYED;
        }

        return self::STATUS_DEAD;
    }
528162
def log_status (self):
        """"""
        duration = time.time() - self.start_time
        checked, in_progress, queue = self.aggregator.urlqueue.status()
        num_urls = len(self.aggregator.result_cache)
        self.logger.log_status(checked, in_progress, queue, duration, num_urls)
359710
def maintenance_sleeper(api, response, sleep=300):
    
    while response.status_code == 503:
        logger.info('Service unavailable: Response=[%s]',
                    six.text_type(response.__dict__))
        response_body = response.json()
        if 'code' in response_body:
            if response_body['code'] == 0:
                logger.warning('API Maintenance in progress!'
                               ' Waiting for [%s]s', sleep)
                time.sleep(sleep)
                response = api.session.send(response.request)
            else:
                return response
        else:
            return response
    return response
539492
def QA_util_time_stamp(time_):
    
    if len(str(time_)) == 10:
        # yyyy-mm-dd格式
        return time.mktime(time.strptime(time_, '%Y-%m-%d'))
    elif len(str(time_)) == 16:
        # yyyy-mm-dd hh:mm格式
        return time.mktime(time.strptime(time_, '%Y-%m-%d %H:%M'))
    else:
        timestr = str(time_)[0:19]
        return time.mktime(time.strptime(timestr, '%Y-%m-%d %H:%M:%S'))
231004
def status(self, return_led=0):
        """"""
        status = self.hub.get_device_status(self.device_id, return_led)
        self.logger.info("Dimmer %s status: %s", self.device_id,
                         pprint.pformat(status))
        return status
1235152
def status():
    ''''''
    with Session() as session:
        resp = session.Manager.status()
        print(tabulate([('Status', 'Active Sessions'),
                        (resp['status'], resp['active_sessions'])],
                       headers='firstrow'))
948473
function status(isVerbose) {
    // Load bower.json and make sure it is a locked bower.json file
    var bowerConfigStr = fs.readFileSync('bower.json', {encoding: 'utf8'});
    var bowerConfig = JSON.parse(bowerConfigStr);
    var locked = bowerConfig.bowerLocker;
    if (locked) {
        var timeDiff = (new Date()).getTime() - (new Date(locked.lastUpdated)).getTime();
        console.log('bower.json was locked as of %s (%s)', locked.lastUpdated, formatTimeDiff(timeDiff));
        if (isVerbose) {
            console.log('Currently locked dependencies:');
            Object.keys(locked.lockedVersions).forEach(function(key) {
                console.log('  %s (%s): %s', key, locked.lockedVersions[key], bowerConfig.resolutions[key]);
            });
        }
    } else {
        console.log('The bower.json is currently unlocked.\n');
    }
}
1070750
def check_due(self):
        """"""
        if self.disabled:
            return False
        if self.is_running:
            return False
        if self.delta is None:
            return False
        last_run = self.last_run
        if last_run is None:
            return True
        now = datetime.utcnow()
        if now > last_run + self.delta:
            return True
        return False
291618
def clock_in(request):
    """"""
    user = request.user
    # Lock the active entry for the duration of this transaction, to prevent
    # creating multiple active entries.
    active_entry = utils.get_active_entry(user, select_for_update=True)

    initial = dict([(k, v) for k, v in request.GET.items()])
    data = request.POST or None
    form = ClockInForm(data, initial=initial, user=user, active=active_entry)
    if form.is_valid():
        entry = form.save()
        message = 'You have clocked into {0} on {1}.'.format(
            entry.activity.name, entry.project)
        messages.info(request, message)
        return HttpResponseRedirect(reverse('dashboard'))

    return render(request, 'timepiece/entry/clock_in.html', {
        'form': form,
        'active': active_entry,
    })
6657
def customer_active?(code = nil)
      subscription = customer_subscription(code)
      if subscription[:canceledDatetime] && subscription[:canceledDatetime] <= Time.now
        false
      else
        true
      end
    end
316874
def str_uptime(self):
        """"""
        mins, secs = divmod(self.uptime, 60)
        hours, mins = divmod(mins, 60)
        return '%02d:%02d:%02d' % (hours, mins, secs)