Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

logstash-mixin-scheduler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logstash-mixin-scheduler

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Scheduler Mixin

Build Status

Usage

  1. Add this gem as a runtime dependency of your Logstash plugin's gemspec:

    Gem::Specification.new do |s|
      # ...
    
      s.add_runtime_dependency 'logstash-mixin-scheduler', '~> 1.0'
    end
    
  2. In your plugin code, require this library and include it into your plugin class that already inherits LogStash::Plugin:

    require 'logstash/plugin_mixins/scheduler'
    
    class LogStash::Inputs::Bar < Logstash::Inputs::Base
    
      include LogStash::PluginMixins::Scheduler
    
      # Schedule of when to periodically run statement, in Cron format
      # for example: "* * * * *" (execute query every minute, on the minute)
      config :schedule, :validate => :string
    
      def run(queue)
        if @schedule
          scheduler.cron(@schedule) { serve_drinks(queue) }
          scheduler.join
        else
          serve_drinks(queue)
        end
      end
    
      # def server_drinks ...
    
    end
    

Development

This gem:

  • MUST remain API-stable at 1.x
  • MUST NOT introduce additional runtime dependencies

FAQs

Package last updated on 14 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc