<commit_before>package storage

import (
	"errors"
	"fmt"
	"sync"

	"github.com/Sirupsen/logrus"

	"github.com/slok/khronos/job"
)

const jobKeyFmt = "job:%d"

// Dummy implements the Storage interface everything to a local memory map
type Dummy struct {
	// Our memory database
	Jobs       map[string]*job.Job
	JobCounter int
	jobsMutex  *sync.Mutex
}

// NewDummy creates a client that stores on memory
func NewDummy() *Dummy {
	logrus.Debug("New Dummy storage client created")
	return &Dummy{
		Jobs:       map[string]*job.Job{},
		JobCounter: 0,
		jobsMutex:  &sync.Mutex{},
	}
}

// GetJobs returns all the http jobs stored on memory<commit_msg>Fix dummy client<commit_after>package storage

import (
	"errors"
	"fmt"
	"sync"

	"github.com/Sirupsen/logrus"

	"github.com/slok/khronos/job"
)

const jobKeyFmt = "job:%d"

// Dummy implements the Storage interface everything to a local memory map
type Dummy struct {
	// Our memory database
	Jobs       map[string]*job.Job
	JobCounter int
	jobsMutex  *sync.Mutex
}

// NewDummy creates a client that stores on memory
func NewDummy() *Dummy {
	logrus.Debug("New Dummy storage client created")
	return &Dummy{
		Jobs:       map[string]*job.Job{},
		JobCounter: 0,
		jobsMutex:  &sync.Mutex{},
	}
}

// Close doens't do nothing on dummy client
func (c *Dummy) Close() error {
	return nil
}

// GetJobs returns all the http jobs stored on memory
{'fraction_non_alphanumeric': 0.11047345767575323, 'fraction_numerical': 0.0014347202295552368, 'mean_word_length': 3.6812080536912752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6390147', 'n_tokens_mistral': 498, 'n_tokens_neox': 488, 'n_words': 149}