Skip to content

Commit

Permalink
fix: export max payload exceeded (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
npaton authored Dec 3, 2023
1 parent 54bd491 commit 685ceb4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/fix-change-overflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@empirica/core": patch
---

Fix issue in Tajriba where the change queue could hit an out of bounds error.
5 changes: 5 additions & 0 deletions .changeset/fix-export-max-payload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@empirica/core": patch
---

Fix `Max payload size exceeded` error when exporting data.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/charmbracelet/lipgloss v0.5.0
github.com/cortesi/moddwatch v0.0.0-20210323234936-df014e95c743
github.com/davecgh/go-spew v1.1.1
github.com/empiricaly/tajriba v1.4.0
github.com/empiricaly/tajriba v1.5.0
github.com/go-playground/validator/v10 v10.11.0
github.com/jpillora/backoff v1.0.0
github.com/json-iterator/go v1.1.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/empiricaly/tajriba v1.4.0 h1:BPXa3JcuaLGebZ18dDOxXf6PpWbJanzrJylebpxErUQ=
github.com/empiricaly/tajriba v1.4.0/go.mod h1:TqAM0iRbN78gE5vnZ1Ot6PQOidfYM5FwIdoU/UB+wrE=
github.com/empiricaly/tajriba v1.5.0 h1:ALpM3WyahVfiotLIY93ILYN5rEbdJvsLGLcTG9cG9rA=
github.com/empiricaly/tajriba v1.5.0/go.mod h1:TqAM0iRbN78gE5vnZ1Ot6PQOidfYM5FwIdoU/UB+wrE=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
Expand Down
1 change: 1 addition & 0 deletions lib/@empirica/core/src/admin/classic/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export async function connect(
clientName: string = "api"
): Promise<Conn> {
const tajriba = await Tajriba.createAndAwait(tajURL);
tajriba.useHTTP = true;

if (!token) {
token = await tajriba.registerService(clientName, srtoken);
Expand Down
3 changes: 2 additions & 1 deletion lib/@empirica/core/src/shared/tajriba_connection.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { ParticipantIdent, Tajriba } from "@empirica/tajriba";
import { bs } from "../utils/object";
import { BehaviorSubject } from "rxjs";

export const ErrNotConnected = new Error("not connected");

export class TajribaConnection {
readonly tajriba: Tajriba;
private _connected = bs(false);
private _connecting = bs(true);
private _connecting: BehaviorSubject<boolean> = bs(true);
private _stopped = bs(false);

constructor(private url: string) {
Expand Down

0 comments on commit 685ceb4

Please sign in to comment.