Skip to content

create polling mode #16

@championswimmer

Description

@championswimmer

for POST /api/run an extra body parameter called mode

Possible values of mode are -

  • sync
  • poll
  • callback

For sync mode

  • current mode of operation
  • request is held till judgement is over, and then response is sent

Poll mode

  • on request, we create a new job id
  • send the job id in the response
  • when judgement is over, in db, update the job status to done
  • client can continuosly request status of job via job id
  • GET /api/run/:jobid
    • responds status: running till it is incomplete
    • responses status: success or status: error with output and error base64 when done

callback mode (or webhook mode)

  • request body will contain a callbackUrl param also
  • when job is done, judge will make a POST request to callbackUrl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions