small fixes
This commit is contained in:
parent
3f42d7e5c7
commit
5d2acd4645
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ coverage
|
|||
tmp
|
||||
build
|
||||
*.log
|
||||
db.sql
|
||||
|
|
@ -231,7 +231,8 @@ CREATE TABLE odds (
|
|||
source TEXT DEFAULT 'b365api',
|
||||
is_active BOOLEAN DEFAULT true,
|
||||
UNIQUE (market_id, name, handicap),
|
||||
UNIQUE (event_id, market_id, name, handicap)
|
||||
UNIQUE (event_id, market_id, name, handicap),
|
||||
UNIQUE (event_id, market_id)
|
||||
);
|
||||
ALTER TABLE refresh_tokens
|
||||
ADD CONSTRAINT fk_refresh_tokens_users FOREIGN KEY (user_id) REFERENCES users(id);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ func StartDataFetchingCrons(eventService eventsvc.Service, oddsService oddssvc.S
|
|||
}{
|
||||
|
||||
{
|
||||
spec: "*/30 * * * * *", // Every 30 seconds
|
||||
|
||||
spec: "0 0 * * * *", // Every hour
|
||||
task: func() {
|
||||
if err := eventService.FetchUpcomingEvents(context.Background()); err != nil {
|
||||
log.Printf("FetchUpcomingEvents error: %v", err)
|
||||
|
|
@ -38,7 +39,7 @@ func StartDataFetchingCrons(eventService eventsvc.Service, oddsService oddssvc.S
|
|||
// },
|
||||
|
||||
{
|
||||
spec: "*/5 * * * * *", // Every 5 seconds
|
||||
spec: "0 */15 * * * *", // Every 15 minutes
|
||||
task: func() {
|
||||
if err := oddsService.FetchNonLiveOdds(context.Background()); err != nil {
|
||||
log.Printf("FetchNonLiveOdds error: %v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user