raven を rhino.etl コンソールで動作させて、sql から raven に日付をインポートしようとしています。
私は RavenInstaller を持っています:
public class RavenInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(
Component.For<IDocumentStore>().ImplementedBy<DocumentStore>()
.DependsOn(new { connectionStringName = "SomeRavenConnectionString" })
.OnCreate(DoInitialisation)
.LifeStyle.Singleton
);
}
static IDocumentSession GetDocumentSesssion(IKernel kernel)
{
var store = kernel.Resolve<IDocumentStore>();
return store.OpenSession();
}
public static void DoInitialisation(IKernel kernel, IDocumentStore store)
{
store.Initialize();
}
}
ただし、_documentSession.OpenSession() を呼び出すと、アプリがハングします。
コンソール アプリ環境で指定する必要があるものはありますか? タイムアウトしたと言い続けますが、設定の URL は localhost:8080 で、これは正しいですか?
私は今使用するように変更しました:
using (var documentStore = new DocumentStore { Url = "http://localhost:8080" })
{
documentStore.Initialize();
using (var session = documentStore.OpenSession())
{
var mp = _container.Resolve<MainProcess>();
mp.DocumentSession = session;
mp.Execute();
}
}
しかし、まだopensessionにかかっています。