MCPcopy Index your code
hub / github.com/saltstack/salt / run

Method run

salt/master.py:807–839  ·  view source on GitHub ↗

Start the update threads

(self)

Source from the content-addressed store, hash-verified

805 condition.wait(interval)
806
807 def run(self):
808 """
809 Start the update threads
810 """
811 if (
812 self.opts["fileserver_update_niceness"]
813 and not salt.utils.platform.is_windows()
814 ):
815 log.info(
816 "setting FileServerUpdate niceness to %d",
817 self.opts["fileserver_update_niceness"],
818 )
819 os.nice(self.opts["fileserver_update_niceness"])
820
821 # Clean out the fileserver backend cache
822 salt.daemons.masterapi.clean_fsbackend(self.opts)
823
824 for interval in self.buckets:
825 self.update_threads[interval] = threading.Thread(
826 target=self.update,
827 args=(
828 interval,
829 self.buckets[interval],
830 self.opts["fileserver_interval"],
831 ),
832 )
833 self.update_threads[interval].start()
834
835 while self.update_threads:
836 for name, thread in list(self.update_threads.items()):
837 thread.join(1)
838 if not thread.is_alive():
839 self.update_threads.pop(name)
840
841
842class Master(SMaster):

Callers

nothing calls this directly

Calls 5

listFunction · 0.50
infoMethod · 0.45
startMethod · 0.45
itemsMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected