set recorder work status
423949
function setRecorderWork(enable){
    isWorking = enable;
    if(isWorking){
        chrome.browserAction.setTitle({title: __('icon_record_tip')});
        chrome.browserAction.setIcon({path: workIcon===1?ENABLE_ICON1:ENABLE_ICON2});
        workIcon *= -1;
        workIconTimer = setTimeout(function(){
            setRecorderWork(true);
        }, 1000);
    }
    else{
        clearTimeout(workIconTimer);
        chrome.browserAction.setTitle({title: __('icon_end_tip')});
        chrome.browserAction.setIcon({path: DISABLE_ICON});
    }
}
1167251
public void pauseRecording(){
        if (currentAudioState.get()==RECORDING_STATE){
            currentAudioState.getAndSet(PAUSED_STATE);
            onTimeCompletedTimer.cancel();
            remainingMaxTimeInMillis=remainingMaxTimeInMillis-(System.currentTimeMillis()-recordingStartTimeMillis);
        }
        else{
            Log.w(TAG,"Audio recording is not recording");
        }
    }
601983
def set_vm_status(self, device='FLOPPY',
                      boot_option='BOOT_ONCE', write_protect='YES'):
        
        return self._call_method('set_vm_status', device, boot_option,
                                 write_protect)
321596
def record(self, record=True, tag=None):
        
        path = '/startvideo?force=1' if record else '/stopvideo?force=1'
        if record and tag is not None:
            path = '/startvideo?force=1&tag={}'.format(URL(tag).raw_path)

        return self._request(path)
362549
def set_status(
        db,
        aid: int,
        complete: Any,
        watched_episodes: int,
) -> None:
    """"""
    upsert(db, 'cache_anime', ['aid'], {
        'aid': aid,
        'complete': 1 if complete else 0,
        'watched_episodes': watched_episodes,
    })
1062923
def _startRecording(self, filename):
        
        self.setOption('_log_file_name', filename)
        self.setOption('_log_input_only', True)
        self.setOption('_log', True)
435878
function setStatus(err) {
    var code = constants.status.UNKNOWN;
    var details = 'Unknown Error';
    var metadata = new Metadata();
    if (err.hasOwnProperty('message')) {
      details = err.message;
    }
    if (err.hasOwnProperty('code')) {
      code = err.code;
      if (err.hasOwnProperty('details')) {
        details = err.details;
      }
    }
    if (err.hasOwnProperty('metadata')) {
      metadata = err.metadata;
    }
    stream.status = {code: code, details: details, metadata: metadata};
  }
853363
def worker_status(worker, profile='default'):
    '''
    
    '''

    config = get_running(profile)
    try:
        return {
            'activation': config['worker.{0}.activation'.format(worker)],
            'state': config['worker.{0}.state'.format(worker)],
        }
    except KeyError:
        return False
590705
def set_status(self, status):
        

        text = ""
        colour = "#FFFFFF"
        if status == 0:
            text = "OFFLINE"
            colour = "#EF9A9A"
        elif status == 1:
            text = "STARTING"
            colour = "#FFE082"
        elif status == 2:
            text = "ONLINE"
            colour = "#A5D6A7"

        self.status.set(text)
        self.statusbar.config(background=colour)
1007004
def update_status(self, reset=False):
        """"""
        if self.healthy_update_timer and not reset:
            return

        # get device features only once
        if not self.device_features:
            self.handle_features(self.get_features())

        # Get status from device to register/keep alive UDP
        self.handle_status()

        # Schedule next execution
        self.setup_update_timer()
38787
def set_status(self, instance, status):
        """"""
        status_key = self.get_status_key(instance)
        cache.set(status_key, status, timeout=300)
37883
def execute(self, duration):
        
        self.statuses.append({'name': ScheduledMeasurementStatus.RUNNING.name, 'time': datetime.utcnow()})
        try:
            self.recording = True
            self.device.start(self.name, durationInSeconds=duration)
        finally:
            self.recording = False
        if self.device.status == RecordingDeviceStatus.FAILED:
            self.statuses.append({'name': ScheduledMeasurementStatus.FAILED.name,
                                  'time': datetime.utcnow(),
                                  'reason': self.device.failureCode})
        else:
            self.statuses.append({'name': ScheduledMeasurementStatus.COMPLETE.name, 'time': datetime.utcnow()})
        # this is a bit of a hack, need to remove this at some point by refactoring the way measurements are stored
        if self.callback is not None:
            self.callback()
1010425
def on_status(self, status):
        """"""
        self.out.write(json.dumps(status))
        self.out.write(os.linesep)

        self.received += 1
        return not self.terminate
668688
def setCurrentRecord( self, record ):
        
        mode = self.currentMode()
        if ( mode == XOrbBrowserWidget.Mode.Detail ):
            self.detailWidget().setCurrentRecord(record)
        
        elif ( mode == XOrbBrowserWidget.Mode.Thumbnail ):
            thumbs = self.thumbnailWidget()
            for row in range(thumbs.count()):
                item = thumbs.item(row)
                if ( isinstance(item, RecordListWidgetItem) and \
                     item.record() == item ):
                    thumbs.setCurrentItem(item)
                    break
499481
def set_schedule_record_config(self, is_enable, record_level,
                                   space_full_mode, is_enable_audio,
                                   schedule0 = 0, schedule1 = 0, schedule2 = 0,
                                   schedule3 = 0, schedule4 = 0, schedule5 = 0,
                                   schedule6 = 0, callback=None):
        '''
        
        '''

        params = {'isEnable'     : is_enable,
                  'isEnableAudio': is_enable_audio,
                  'recordLevel'  : record_level,
                  'spaceFullMode': space_full_mode,
                  'schedule0'    : schedule0,
                  'schedule1'    : schedule1,
                  'schedule2'    : schedule2,
                  'schedule3'    : schedule3,
                  'schedule4'    : schedule4,
                  'schedule5'    : schedule5,
                  'schedule6'    : schedule6,
                  }
        return self.execute_command('setScheduleRecordConfig', params, callback=callback)
360100
def set_status(self, status):
        
        self.status = status
        for callback in self._update_status_callbacks:
            callback(self)
1190396
def startMeasurement(self, measurementId, deviceId):
        
        am, handler = self.getDataHandler(measurementId, deviceId)
        if am is not None:
            am.status = MeasurementStatus.RECORDING
            am.updateDeviceStatus(deviceId, RecordStatus.RECORDING)
            handler.start(am.idAsPath)
            return True
        else:
            return False