Example #1
0
    def on_start(self):
        app = self.app
        WorkController.on_start(self)

        # this signal can be used to, for example, change queues after
        # the -Q option has been applied.
        signals.celeryd_after_setup.send(
            sender=self.hostname, instance=self, conf=app.conf,
        )

        if self.purge:
            self.purge_messages()

        # Dump configuration to screen so we have some basic information
        # for when users sends bug reports.
        use_image = term.supports_images()
        if use_image:
            print(term.imgcat(static.logo()))
        print(safe_str(''.join([
            string(self.colored.cyan(
                ' \n', self.startup_info(artlines=not use_image))),
            string(self.colored.reset(self.extra_info() or '')),
        ])), file=sys.__stdout__)
        self.set_process_status('-active-')
        self.install_platform_tweaks(self)
        if not self._custom_logging and self.redirect_stdouts:
            app.log.redirect_stdouts(self.redirect_stdouts_level)
Example #2
0
 def emit_banner(self):
     # Dump configuration to screen so we have some basic information
     # for when users sends bug reports.
     use_image = term.supports_images()
     if use_image:
         print(term.imgcat(static.logo()))
     print(safe_str(''.join([
         string(self.colored.cyan(
             ' \n', self.startup_info(artlines=not use_image))),
         string(self.colored.reset(self.extra_info() or '')),
     ])), file=sys.__stdout__)
Example #3
0
 def emit_banner(self):
     # Dump configuration to screen so we have some basic information
     # for when users sends bug reports.
     use_image = term.supports_images()
     if use_image:
         print(term.imgcat(static.logo()))
     print(safe_str(''.join([
         string(self.colored.cyan(
             ' \n', self.startup_info(artlines=not use_image))),
         string(self.colored.reset(self.extra_info() or '')),
     ])), file=sys.__stdout__)