wsp-ms-core 1.1.15 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2064,7 +2064,7 @@ var InboxMysqlRepository = class {
2064
2064
  }
2065
2065
  async listPending(limit) {
2066
2066
  const result = await this.connection.query(
2067
- `SELECT * FROM events_inbox WHERE status IN ('PENDING','FAILED') AND events_inbox.processed_at IS NULL LIMIT ${limit}`,
2067
+ `SELECT * FROM events_inbox WHERE status IN ('PENDING','FAILED') AND events_inbox.processed_at IS NULL ORDER BY created_at DESC LIMIT ${limit}`,
2068
2068
  []
2069
2069
  );
2070
2070
  return result.length > 0 ? result.map((r) => InboxRecord.reconstitute(r)) : [];