Skip to content

Commit

Permalink
Fix the queue again (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
NatTuck authored Jan 6, 2025
1 parent 5360802 commit 7fd5bbe
Show file tree
Hide file tree
Showing 182 changed files with 4,685 additions and 2,154 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Set up Elixir
uses: erlef/setup-beam@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0
uses: erlef/setup-beam@v1
with:
elixir-version: '1.16.2' # [Required] Define the Elixir version
otp-version: '26.0' # [Required] Define the Erlang/OTP version
elixir-version: '1.18.0' # [Required] Define the Elixir version
otp-version: '27.0' # [Required] Define the Erlang/OTP version
- name: Restore dependencies cache
uses: actions/cache@v3
with:
Expand Down
9 changes: 5 additions & 4 deletions assets/js/itty.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,20 @@ export function withChannel(op) {

export function Itty({chan, uuid, token}) {
const dispatch = useDispatch();
const {blocks, done} = useSelector(({blocks, done}) => ({blocks, done}));
const blocks = useSelector((state) => state.blocks);
const done = useSelector((state) => state.done);
console.log("blocks,done", blocks, done);

useEffect(() => {
channel = socket.channel(chan + ":" + uuid, {token});
channel.join()
.receive("ok", (msg) => {
console.log("Joined", uuid, msg);
dispatch({type: 'set', data: msg});
dispatch({type: 'set', data: msg});
})
.receive("error", (msg) => {
console.log("Unable to join", msg);
channel.leave();
channel.leave();
});
channel.on("block", (msg) => {
console.log("Block", uuid, msg);
Expand All @@ -57,7 +58,7 @@ export function Itty({chan, uuid, token}) {
let lines = _.sortBy(blocks, ['seq']).map(({seq, text}) => (
<span key={seq}>{parseHTML(ansi_up.ansi_to_html(text))}</span>
));

return (
<>
<pre id="itty-console" className="console autograde-console">{ lines }</pre>
Expand Down
Loading

0 comments on commit 7fd5bbe

Please sign in to comment.