Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

no output when executing HttpService #14

Open
git-unica opened this issue Sep 20, 2023 · 0 comments
Open

no output when executing HttpService #14

git-unica opened this issue Sep 20, 2023 · 0 comments

Comments

@git-unica
Copy link

git-unica commented Sep 20, 2023

@Command('video_job:callback {videoId}')
  async videoJobCallback(_cli: ConsoleIO) {
    const videoId = _cli.argument<number>('videoId');
    const videoJob = await this.videosService.findJobByVideoId(videoId);

    if (videoJob) {
      if (!videoJob.callback_url) {
        _cli.error('No callback_url');
        return;
      }

      const video = videoJob.video;
      if (!video) {
        _cli.error(`No video: ${videoId}`);
        return;
      }

      this.httpService
        .post(videoJob.callback_url, {...})
        .subscribe({
          complete: () => {
            _cli.success(`Post data to ${videoJob.callback_url}`);
          },
          error: (err) => {
            _cli.error(`Error callback ${err.message}`);
          },
        });
    } else {
      _cli.info(`No job with video_id: ${videoId}`);
    }

everything is fine, only _cli in subscribe is not printed to terminal,

The data is also updated properly via the above callback_url

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant