fix odd
This commit is contained in:
parent
b8d15695a4
commit
d416a40cae
|
|
@ -19,16 +19,21 @@ INSERT INTO odds (
|
|||
$1, $2, $3, $4, $5, $6, $7,
|
||||
$8, $9, $10, $11, $12, $13, $14, $15
|
||||
)
|
||||
ON CONFLICT (market_id, name, handicap) DO UPDATE SET
|
||||
odds_value = EXCLUDED.odds_value,
|
||||
raw_odds = EXCLUDED.raw_odds,
|
||||
market_type = EXCLUDED.market_type,
|
||||
market_name = EXCLUDED.market_name,
|
||||
ON CONFLICT (event_id, market_id) DO UPDATE SET
|
||||
odds_value = EXCLUDED.odds_value,
|
||||
raw_odds = EXCLUDED.raw_odds,
|
||||
market_type = EXCLUDED.market_type,
|
||||
market_name = EXCLUDED.market_name,
|
||||
market_category = EXCLUDED.market_category,
|
||||
fetched_at = EXCLUDED.fetched_at,
|
||||
is_active = EXCLUDED.is_active,
|
||||
source = EXCLUDED.source,
|
||||
fi = EXCLUDED.fi;
|
||||
name = EXCLUDED.name,
|
||||
handicap = EXCLUDED.handicap,
|
||||
fetched_at = EXCLUDED.fetched_at,
|
||||
is_active = EXCLUDED.is_active,
|
||||
source = EXCLUDED.source,
|
||||
fi = EXCLUDED.fi;
|
||||
|
||||
|
||||
|
||||
|
||||
-- name: GetPrematchOdds :many
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -295,16 +295,18 @@ INSERT INTO odds (
|
|||
$1, $2, $3, $4, $5, $6, $7,
|
||||
$8, $9, $10, $11, $12, $13, $14, $15
|
||||
)
|
||||
ON CONFLICT (market_id, name, handicap) DO UPDATE SET
|
||||
odds_value = EXCLUDED.odds_value,
|
||||
raw_odds = EXCLUDED.raw_odds,
|
||||
market_type = EXCLUDED.market_type,
|
||||
market_name = EXCLUDED.market_name,
|
||||
ON CONFLICT (event_id, market_id) DO UPDATE SET
|
||||
odds_value = EXCLUDED.odds_value,
|
||||
raw_odds = EXCLUDED.raw_odds,
|
||||
market_type = EXCLUDED.market_type,
|
||||
market_name = EXCLUDED.market_name,
|
||||
market_category = EXCLUDED.market_category,
|
||||
fetched_at = EXCLUDED.fetched_at,
|
||||
is_active = EXCLUDED.is_active,
|
||||
source = EXCLUDED.source,
|
||||
fi = EXCLUDED.fi
|
||||
name = EXCLUDED.name,
|
||||
handicap = EXCLUDED.handicap,
|
||||
fetched_at = EXCLUDED.fetched_at,
|
||||
is_active = EXCLUDED.is_active,
|
||||
source = EXCLUDED.source,
|
||||
fi = EXCLUDED.fi
|
||||
`
|
||||
|
||||
type InsertNonLiveOddParams struct {
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ func StartDataFetchingCrons(eventService eventsvc.Service, oddsService oddssvc.S
|
|||
// },
|
||||
|
||||
|
||||
// {
|
||||
// spec: "*/30 * * * * *", // Every 30 seconds
|
||||
// {
|
||||
// spec: "*/5 * * * * *", // Every 5 seconds
|
||||
// task: func() {
|
||||
// if err := oddsService.FetchNonLiveOdds(context.Background()); err != nil {
|
||||
// log.Printf("FetchNonLiveOdds error: %v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user