func (s *GaiaPipelineService) StopPoller() error {
	if isPollerRunning {
		isPollerRunning = false
		select {
		case pollerDone <- struct{}{}:
		default:
		}
		return nil
	}
	return errors.New("poller is not running")
}
StopPoller sends a done signal to the polling timer if it's running.
package pipeline
import (
	"bytes"
	"errors"
	"fmt"
	"io/ioutil"
	"path/filepath"
	"strings"
	"time"
	"github.com/robfig/cron"
	"github.com/gaia-pipeline/gaia"
	"github.com/gaia-pipeline/gaia/helper/filehelper"
	"github.com/gaia-pipeline/gaia/helper/pipelinehelper"
	"github.com/gaia-pipeline/gaia/services"
)
const (
	tickerIntervalSeconds = 5
)
var pollerDone = make(chan struct{}, 1)
var isPollerRunning bool