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

when disabled timeout it always throw error #22

Open
mix5003 opened this issue Mar 18, 2020 · 1 comment
Open

when disabled timeout it always throw error #22

mix5003 opened this issue Mar 18, 2020 · 1 comment

Comments

@mix5003
Copy link

mix5003 commented Mar 18, 2020

when i use eastern job --timeout 0 migrate_job.yaml default $BITBUCKET_COMMIT. it ran job normally but it throw an error below.

Cleaning up job database-migrate-job-5d74557cd710d188aaadfc3ebbcc9b89300555d6
job.batch "database-migrate-job-5d74557cd710d188aaadfc3ebbcc9b89300555d6" deleted
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/eastern-4.4.1-py3.7.egg/eastern/timeout.py", line 34, in run
  File "/usr/local/lib/python3.7/site-packages/eastern-4.4.1-py3.7.egg/eastern/timeout.py", line 66, in set_timeout
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 651, in call_later
    timer = self.call_at(self.time() + delay, callback, *args,
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/eastern", line 11, in <module>
    load_entry_point('eastern==4.4.1', 'console_scripts', 'eastern')()
  File "/usr/local/lib/python3.7/site-packages/click-6.7-py3.7.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click-6.7-py3.7.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click-6.7-py3.7.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click-6.7-py3.7.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click-6.7-py3.7.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click-6.7-py3.7.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/eastern-4.4.1-py3.7.egg/eastern/cli.py", line 223, in job
  File "/usr/local/lib/python3.7/site-packages/eastern-4.4.1-py3.7.egg/eastern/job_manager.py", line 78, in wait_completion
  File "/usr/local/lib/python3.7/site-packages/eastern-4.4.1-py3.7.egg/eastern/timeout.py", line 20, in run_sync
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/site-packages/eastern-4.4.1-py3.7.egg/eastern/timeout.py", line 53, in run
AttributeError: 'ProcessTimeout' object has no attribute '_timeout'```
@whs
Copy link
Member

whs commented Mar 18, 2020

The best practice is to set the timeout to large value, which is what we're using now as well (and there are still misbehaving jobs hitting that limits...)

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

2 participants