diff options
| author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-12 03:58:03 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-12 03:58:03 -0700 |
| commit | 69c21c3757a75d43e212bcebcfb59f2a4e8b91a6 (patch) | |
| tree | eea75cc719cce03267bd05a02428d912a1bee4cb /bin | |
| parent | c2c113917d3e354f85d473a6d646688b59abad17 (diff) | |
| parent | c7921fd14e680288c5626294105761005684b343 (diff) | |
| download | nova-69c21c3757a75d43e212bcebcfb59f2a4e8b91a6.tar.gz nova-69c21c3757a75d43e212bcebcfb59f2a4e8b91a6.tar.xz nova-69c21c3757a75d43e212bcebcfb59f2a4e8b91a6.zip | |
merged instance time and added better concurrency
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-scheduler | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/bin/nova-scheduler b/bin/nova-scheduler new file mode 100755 index 000000000..38a8f213f --- /dev/null +++ b/bin/nova-scheduler @@ -0,0 +1,43 @@ +#!/usr/bin/env python +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2010 United States Government as represented by the +# Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +""" + Twistd daemon for the nova scheduler nodes. +""" + +import os +import sys + +# If ../nova/__init__.py exists, add ../ to Python search path, so that +# it will override what happens to be installed in /usr/(local/)lib/python... +possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), + os.pardir, + os.pardir)) +if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): + sys.path.insert(0, possible_topdir) + +from nova import service +from nova import twistd + + +if __name__ == '__main__': + twistd.serve(__file__) + +if __name__ == '__builtin__': + application = service.Service.create() |
