Permalink
Browse files

Add missing template to manifest and missing patch to migration script.

  • Loading branch information...
1 parent 85dd1ed commit 95b4308ef5f4a49e4a9d34154ca125130f92857d @dnephin dnephin committed Feb 12, 2013
Showing with 5 additions and 7 deletions.
  1. +1 −0 MANIFEST.in
  2. +3 −6 tools/migration/migrate_state.py
  3. +1 −1 tron/__init__.py
View
@@ -3,6 +3,7 @@ include *.md
include Makefile
include tron/default_config.yaml
include tron/logging.conf
+include tron/named_config_template.yaml
recursive-include debian *
recursive-include tests *.py *.yaml
recursive-include docs *.txt *.rst *.yaml *.1 *.8
@@ -14,15 +14,12 @@
Pre 0.5 state files can be read by the YamlStateStore. See the configuration
documentation for more details on how to create state_persistence sections.
"""
-from collections import namedtuple
-
import optparse
from tron.config import manager, schema
+from tron.serialize import runstate
from tron.serialize.runstate.statemanager import PersistenceManagerFactory
from tron.utils import tool_utils
-Item = namedtuple('Item', ['name', 'state_data'])
-
def parse_options():
parser = optparse.OptionParser()
@@ -94,11 +91,11 @@ def convert_state(opts):
service_states = add_namespaces(service_states)
for name, job in job_states.iteritems():
- dest_manager.save_job(Item(name, job))
+ dest_manager.save(runstate.JOB_STATE, name, job)
print "Migrated %s jobs." % len(job_states)
for name, service in service_states.iteritems():
- dest_manager.save_service(Item(name, service))
+ dest_manager.save(runstate.SERVICE_STATE, name, service)
print "Migrated %s services." % len(service_states)
dest_manager.cleanup()
View
@@ -1,4 +1,4 @@
-__version_info__ = (0, 5, 2, 1)
+__version_info__ = (0, 5, 2, 2)
__version__ = ".".join("%s" % v for v in __version_info__)
__author__ = 'Yelp <yelplabs@yelp.com>'

0 comments on commit 95b4308

Please sign in to comment.