-
Notifications
You must be signed in to change notification settings - Fork 12
Retriable client #195
Retriable client #195
Conversation
4a88782
to
a89ee2a
Compare
3698e90
to
8b0d2e6
Compare
019668b
to
53476e0
Compare
8b0d2e6
to
fa24151
Compare
you can fix taplo by running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
tracing.workspace = true | ||
tracing-subscriber.workspace = true | ||
uuid.workspace = true | ||
|
||
lambda_runtime = "0.13.0" | ||
lambda_http = "0.13.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to the root Cargo.toml
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's needed only in lambda level
time: &DateTime<Utc>, | ||
exclusive_start_key: &Option<HashMap<String, AttributeValue>>, | ||
) -> Result<ScanOutput, DBScanError> { | ||
const MAX_CAPACITY: usize = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const MAX_CAPACITY: usize = 100; | |
const MAX_CAPACITY: i32 = 100; |
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything associated with array size, capacity, indexes shall be usize
#[derive(Default)] | ||
pub enum DynamoDBAction { | ||
#[default] | ||
Default, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: why do we need the default field here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of borrow checker in Retrier::resend_pending_actions algorithm, which is pretty much Vec::retain. Because. We need to take ownership of action to extract oneshot::sender, but we can't since its within an array we reference, so we replace is with Default.
All defaults at the end will wether be overridden or truncated
53476e0
to
a18a661
Compare
8f04023
to
57630f6
Compare
Retriable clients, to keep from failing on connection errors.