Skip to content

Commit c0cccd6

Browse files
committed
fixup! Break ties of PreferDistinct submissions with equal counts
move to the top
1 parent 5eeb88f commit c0cccd6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • opsqueue/src/consumer/dispatcher

‎opsqueue/src/consumer/dispatcher/mod.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,9 @@ impl Dispatcher {
256256
async fn register_lookups(&self, conn: &mut sqlx::SqliteConnection) -> Result<(), sqlx::Error> {
257257
let mut handle = conn.lock_handle().await?;
258258
let sqlite = handle.as_raw_handle().as_ptr();
259-
let reserved_function_name = b"opsqueue_is_reserved\0";
260-
let metadata_count_function_name = b"opsqueue_metadata_count\0";
259+
let reserved_function_name = c"opsqueue_is_reserved";
260+
let metadata_count_function_name = c"opsqueue_metadata_count";
261+
let counts_function_name = c"opsqueue_metadata_counts";
261262

262263
// Register the current reserver state on this connection.
263264
// Re-registering replaces any previous callback on this handle.
@@ -314,10 +315,8 @@ impl Dispatcher {
314315
}
315316

316317
// Register the bulk metadata counts lookup backed by current metastate.
317-
let counts_function_name = b"opsqueue_metadata_counts\0";
318318
let user_data = Box::new(self.metastate.clone());
319319
let user_data = Box::into_raw(user_data).cast::<std::ffi::c_void>();
320-
321320
let rc = unsafe {
322321
ffi::sqlite3_create_function_v2(
323322
sqlite,

0 commit comments

Comments
 (0)