Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

output from jobs is truncated #393

Open
tim-moody opened this issue Apr 17, 2021 · 3 comments
Open

output from jobs is truncated #393

tim-moody opened this issue Apr 17, 2021 · 3 comments

Comments

@tim-moody
Copy link
Contributor

tim-moody commented Apr 17, 2021

  • when Install Configured Options is run only the tail of the job output is shown in Job Status
  • what looks like entire output went to /tmp/job (76398 bytes)
  • but the db also only contains this tail
  • for get zim only tail appeared in Job Status
  • but entire output went to /tmp/job
  • and again only tail is in db

The design called for only the tail to be returned to Job Status, for performance reasons, but the entire output to be stored in the db against a future enhancement that would allow the entire output to be read in Job Status.

@tim-moody
Copy link
Contributor Author

On further investigation this seems to have been intentional under the rationale that there is no reason to store the entire output until it can be viewed. Not sure if this is what's desired. Should probably be modified in conjunction with https://github.com/iiab/iiab-admin-console/projects/7

jobs_running[job_id]['file'].close()

# load output from tmp file
output_file = jobs_running[job_id]['output_file']
#file = open(output_file, 'r')
#job_output = file.read()
#file.close()

command = "tail " + output_file
args = shlex.split(command)
job_output = subproc_check_output(args)
print(type(job_output))
print(job_output)

@tim-moody
Copy link
Contributor Author

In a similar vein I think there are some scripts, mostly python, where the output is only flushed to the output file at the end so that no output appears in Job Status until the job is complete. There are others where output is buffered in ? 256/512 bytes so there are delays in its appearance in Job Status.

@tim-moody
Copy link
Contributor Author

#545

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

No branches or pull requests

1 participant