Sync queue index
**According to index usage, these indexes are not used very frecuently or can ve covered by another index:**
- ("type", "dataset", "revision", "config", "split", "status", "priority"),
- ("priority", "status", "created_at", "namespace"),
- ("unicity_id", "-created_at", "status"), # 4440

I hid them to evaluate if the system will be affected once we delete them. 
 
**Adding these indexes in the code as they already exist in the server and are used by the queries:**
- ("dataset", "status"),
- ("priority", "status", "created_at", "namespace", "difficulty", "unicity_id"),
- ("priority", "status", "created_at", "difficulty", "namespace"),
- ("unicity_id", "status", "-created_at"),
See index usage report:
```
[
  {
    name: 'type_1_dataset_1_revision_1_config_1_split_1_status_1_priority_1',
    key: {
      type: 1,
      dataset: 1,
      revision: 1,
      config: 1,
      split: 1,
      status: 1,
      priority: 1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("8"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        type: 1,
        dataset: 1,
        revision: 1,
        config: 1,
        split: 1,
        status: 1,
        priority: 1
      },
      name: 'type_1_dataset_1_revision_1_config_1_split_1_status_1_priority_1',
      background: false
    }
  },
  {
    name: 'priority_1_status_1_created_at_1_difficulty_1_namespace_1',
    key: {
      priority: 1,
      status: 1,
      created_at: 1,
      difficulty: 1,
      namespace: 1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("11302"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        priority: 1,
        status: 1,
        created_at: 1,
        difficulty: 1,
        namespace: 1
      },
      name: 'priority_1_status_1_created_at_1_difficulty_1_namespace_1'
    }
  },
  {
    name: 'priority_1_status_1_created_at_1_namespace_1_difficulty_1_unicity_id_1',
    key: {
      priority: 1,
      status: 1,
      created_at: 1,
      namespace: 1,
      difficulty: 1,
      unicity_id: 1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("275"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        priority: 1,
        status: 1,
        created_at: 1,
        namespace: 1,
        difficulty: 1,
        unicity_id: 1
      },
      name: 'priority_1_status_1_created_at_1_namespace_1_difficulty_1_unicity_id_1'
    }
  },
  {
    name: 'priority_1_status_1_type_1_namespace_1_unicity_id_1_created_at_1_difficulty_-1',
    key: {
      priority: 1,
      status: 1,
      type: 1,
      namespace: 1,
      unicity_id: 1,
      created_at: 1,
      difficulty: -1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("6030"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        priority: 1,
        status: 1,
        type: 1,
        namespace: 1,
        unicity_id: 1,
        created_at: 1,
        difficulty: -1
      },
      name: 'priority_1_status_1_type_1_namespace_1_unicity_id_1_created_at_1_difficulty_-1'
    }
  },
  {
    name: '_id_',
    key: { _id: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("24007"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: { v: 2, key: { _id: 1 }, name: '_id_' }
  },
  {
    name: 'finished_at_1',
    key: { finished_at: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("0"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { finished_at: 1 },
      name: 'finished_at_1',
      background: false,
      expireAfterSeconds: 600,
      partialFilterExpression: { status: { '$in': [ 'success', 'error', 'cancelled' ] } }
    }
  },
  {
    name: 'status_1_type_1',
    key: { status: 1, type: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("59169"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { status: 1, type: 1 },
      name: 'status_1_type_1',
      background: false
    }
  },
  {
    name: 'type_1_dataset_1_status_1',
    key: { type: 1, dataset: 1, status: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("3252"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { type: 1, dataset: 1, status: 1 },
      name: 'type_1_dataset_1_status_1',
      background: false
    }
  },
  {
    name: 'priority_1_status_1_created_at_1_namespace_1',
    key: { priority: 1, status: 1, created_at: 1, namespace: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("10901"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { priority: 1, status: 1, created_at: 1, namespace: 1 },
      name: 'priority_1_status_1_created_at_1_namespace_1'
    }
  },
  {
    name: 'unicity_id_1_created_at_-1_status_1',
    key: { unicity_id: 1, created_at: -1, status: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("4440"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { unicity_id: 1, created_at: -1, status: 1 },
      name: 'unicity_id_1_created_at_-1_status_1'
    }
  },
  {
    name: 'dataset_1_status_1',
    key: { dataset: 1, status: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("406"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { dataset: 1, status: 1 },
      name: 'dataset_1_status_1'
    }
  },
  {
    name: 'unicity_id_1_status_1_created_at_-1',
    key: { unicity_id: 1, status: 1, created_at: -1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("12700"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { unicity_id: 1, status: 1, created_at: -1 },
      name: 'unicity_id_1_status_1_created_at_-1'
    }
  }

```
Sync queue index: **According to index usage, these indexes are not used very frecuently or can ve covered by another index:**
- ("type", "dataset", "revision", "config", "split", "status", "priority"),
- ("priority", "status", "created_at", "namespace"),
- ("unicity_id", "-created_at", "status"), # 4440

I hid them to evaluate if the system will be affected once we delete them. 
 
**Adding these indexes in the code as they already exist in the server and are used by the queries:**
- ("dataset", "status"),
- ("priority", "status", "created_at", "namespace", "difficulty", "unicity_id"),
- ("priority", "status", "created_at", "difficulty", "namespace"),
- ("unicity_id", "status", "-created_at"),
See index usage report:
```
[
  {
    name: 'type_1_dataset_1_revision_1_config_1_split_1_status_1_priority_1',
    key: {
      type: 1,
      dataset: 1,
      revision: 1,
      config: 1,
      split: 1,
      status: 1,
      priority: 1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("8"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        type: 1,
        dataset: 1,
        revision: 1,
        config: 1,
        split: 1,
        status: 1,
        priority: 1
      },
      name: 'type_1_dataset_1_revision_1_config_1_split_1_status_1_priority_1',
      background: false
    }
  },
  {
    name: 'priority_1_status_1_created_at_1_difficulty_1_namespace_1',
    key: {
      priority: 1,
      status: 1,
      created_at: 1,
      difficulty: 1,
      namespace: 1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("11302"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        priority: 1,
        status: 1,
        created_at: 1,
        difficulty: 1,
        namespace: 1
      },
      name: 'priority_1_status_1_created_at_1_difficulty_1_namespace_1'
    }
  },
  {
    name: 'priority_1_status_1_created_at_1_namespace_1_difficulty_1_unicity_id_1',
    key: {
      priority: 1,
      status: 1,
      created_at: 1,
      namespace: 1,
      difficulty: 1,
      unicity_id: 1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("275"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        priority: 1,
        status: 1,
        created_at: 1,
        namespace: 1,
        difficulty: 1,
        unicity_id: 1
      },
      name: 'priority_1_status_1_created_at_1_namespace_1_difficulty_1_unicity_id_1'
    }
  },
  {
    name: 'priority_1_status_1_type_1_namespace_1_unicity_id_1_created_at_1_difficulty_-1',
    key: {
      priority: 1,
      status: 1,
      type: 1,
      namespace: 1,
      unicity_id: 1,
      created_at: 1,
      difficulty: -1
    },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("6030"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: {
        priority: 1,
        status: 1,
        type: 1,
        namespace: 1,
        unicity_id: 1,
        created_at: 1,
        difficulty: -1
      },
      name: 'priority_1_status_1_type_1_namespace_1_unicity_id_1_created_at_1_difficulty_-1'
    }
  },
  {
    name: '_id_',
    key: { _id: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("24007"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: { v: 2, key: { _id: 1 }, name: '_id_' }
  },
  {
    name: 'finished_at_1',
    key: { finished_at: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("0"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { finished_at: 1 },
      name: 'finished_at_1',
      background: false,
      expireAfterSeconds: 600,
      partialFilterExpression: { status: { '$in': [ 'success', 'error', 'cancelled' ] } }
    }
  },
  {
    name: 'status_1_type_1',
    key: { status: 1, type: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("59169"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { status: 1, type: 1 },
      name: 'status_1_type_1',
      background: false
    }
  },
  {
    name: 'type_1_dataset_1_status_1',
    key: { type: 1, dataset: 1, status: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("3252"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { type: 1, dataset: 1, status: 1 },
      name: 'type_1_dataset_1_status_1',
      background: false
    }
  },
  {
    name: 'priority_1_status_1_created_at_1_namespace_1',
    key: { priority: 1, status: 1, created_at: 1, namespace: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("10901"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { priority: 1, status: 1, created_at: 1, namespace: 1 },
      name: 'priority_1_status_1_created_at_1_namespace_1'
    }
  },
  {
    name: 'unicity_id_1_created_at_-1_status_1',
    key: { unicity_id: 1, created_at: -1, status: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("4440"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { unicity_id: 1, created_at: -1, status: 1 },
      name: 'unicity_id_1_created_at_-1_status_1'
    }
  },
  {
    name: 'dataset_1_status_1',
    key: { dataset: 1, status: 1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("406"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { dataset: 1, status: 1 },
      name: 'dataset_1_status_1'
    }
  },
  {
    name: 'unicity_id_1_status_1_created_at_-1',
    key: { unicity_id: 1, status: 1, created_at: -1 },
    host: 'atlas-x5jgb3-shard-00-01.ujrd0.mongodb.net:27017',
    accesses: { ops: Long("12700"), since: ISODate("2023-11-22T19:20:27.967Z") },
    spec: {
      v: 2,
      key: { unicity_id: 1, status: 1, created_at: -1 },
      name: 'unicity_id_1_status_1_created_at_-1'
    }
  }

```