jamwt
jamwt
CCConvex Community
Created by MegaHydronics on 12/19/2024 in #support-community
Accessing database in an action
hi! queries and mutations need to be deterministic, and actions don't. we'd create race conditions and inconsistencies if we allowed access to the raw db object in actions. for most users, the results would be surprising and unintuitive. however. We do not love at all that it's so verbose to specify queries or mutations that only exist to service one particular action. we'd love to have a way to inline those to make things more ergonomic. but we haven't figured out how to do it yet, especially as it relates to like JavaScript semantics bundler behavior, etc. this is a long topic, but stuff like closures being allowed to mutate vars in the outer scope are particularly nasty and can make unpredictable program behavior
3 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
there's a little thread I created with our ai tool
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
let me ping @Indy , I think there's something we can do here when it's a temporary surge that goes away of bandwidth
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
needs to change to .withIndex
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
this:
const stockRecord = await ctx.db
.query("stock")
.filter((q) => q.eq(q.field("symbol"), args.stock.symbol))
.first();
const stockRecord = await ctx.db
.query("stock")
.filter((q) => q.eq(q.field("symbol"), args.stock.symbol))
.first();
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
they happen far more often that they should, we're not happy about that! we haven't done a good enough job here
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
we're working on tooling and lints and stuff to help point these issues out more easily
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
and then if bandwidth is the issue... it's almost always a missing index
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
so if you ever have this again, you can use this function detail view in order to zero in on what function is the offender
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
that's your culprit
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
yeah! first query, no index
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
b/c yeah, that's doing a ton of reads
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
cool. can you paste the body of that mutateStock function?
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
that's function calls -- change the dropdown to bandwidth
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
No description
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
what does your "Functions breakdown by project" section look like in usage? when you break down by bandwidth?
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
gotcha
55 replies
CCConvex Community
Created by uzamaki21 on 12/15/2024 in #support-community
I currently run a cron job every 20 sec but its using bandwidth a lot how can i reduce the bandwidth
that usually means you're missing an index...
55 replies
CCConvex Community
Created by igor9silva on 12/11/2024 in #support-community
Should I use v.float64()?
v.number is equivalent to v.float64 -- the former is an alias for the latter
3 replies